From cc14c99624ab65133ed537fcf482f89702b9f2fe Mon Sep 17 00:00:00 2001 From: Waldemar Kornewald Date: Wed, 7 Jan 2004 14:58:47 +0000 Subject: [PATCH] I like it better this way. dprintf is not available in userland. ;) git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5980 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../network/ppp/shared/libkernelppp/KPPPLCP.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPLCP.cpp b/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPLCP.cpp index 2f98ca2b01..81077f9390 100644 --- a/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPLCP.cpp +++ b/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPLCP.cpp @@ -11,13 +11,21 @@ #include #include -#include #include #include #include +#ifdef _KERNEL_MODE + #include + #define spawn_thread spawn_kernel_thread + #define printf dprintf +#else + #include +#endif + + PPPLCP::PPPLCP(PPPInterface& interface) : PPPProtocol("LCP", PPP_ESTABLISHMENT_PHASE, PPP_LCP_PROTOCOL, PPP_PROTOCOL_LEVEL, AF_UNSPEC, 0, interface, NULL, PPP_ALWAYS_ALLOWED), @@ -219,7 +227,7 @@ PPPLCP::Receive(struct mbuf *packet, uint16 protocolNumber) return B_ERROR; if(protocolNumber != PPP_LCP_PROTOCOL) { - dprintf("PPPLCP::Receive(): wrong protocol number!\n"); + printf("PPPLCP::Receive(): wrong protocol number!\n"); return PPP_UNHANDLED; }