aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/libalias/alias.c
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2005-05-05 19:27:32 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2005-05-05 19:27:32 +0000
commitc649a2e033f92a25f66149051f8e1db05c8a0b96 (patch)
tree551223f37058e349d2d855665c2547dc7e45f2f2 /sys/netinet/libalias/alias.c
parent2891ace6c8f941c50188bd88716e7a304d6d1cc4 (diff)
downloadsrc-c649a2e033f92a25f66149051f8e1db05c8a0b96.tar.gz
src-c649a2e033f92a25f66149051f8e1db05c8a0b96.zip
Play with includes so that libalias can be compiled both as userland
library and kernel module.
Notes
Notes: svn path=/head/; revision=145921
Diffstat (limited to 'sys/netinet/libalias/alias.c')
-rw-r--r--sys/netinet/libalias/alias.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/netinet/libalias/alias.c b/sys/netinet/libalias/alias.c
index 053c18dc997a..07ae799d8bc1 100644
--- a/sys/netinet/libalias/alias.c
+++ b/sys/netinet/libalias/alias.c
@@ -111,7 +111,12 @@ __FBSDID("$FreeBSD$");
See HISTORY file for additional revisions.
*/
+#ifdef _KERNEL
+#include <sys/param.h>
+#else
#include <sys/types.h>
+#include <stdio.h>
+#endif
#include <netinet/in_systm.h>
#include <netinet/in.h>
@@ -120,10 +125,13 @@ __FBSDID("$FreeBSD$");
#include <netinet/tcp.h>
#include <netinet/udp.h>
-#include <stdio.h>
-
+#ifdef _KERNEL
+#include <netinet/libalias/alias_local.h>
+#include <netinet/libalias/alias.h>
+#else
#include "alias_local.h"
#include "alias.h"
+#endif
#define NETBIOS_NS_PORT_NUMBER 137
#define NETBIOS_DGM_PORT_NUMBER 138