summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-10-19 17:03:03 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-10-19 17:03:03 +0000
commit67921fdf3c8c9eeb2f026dceba3c705d808826d5 (patch)
tree803e8569051ec4e8964686044c5ac35bd5fe0cca /libc
parent61f80c8e515dbc4a6cfcfedf824d762482c06afc (diff)
- do not include netlink headers if netlink is turned off (Michael Deutschmann)
Closes #5544
Diffstat (limited to 'libc')
-rw-r--r--libc/inet/netlinkaccess.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/libc/inet/netlinkaccess.h b/libc/inet/netlinkaccess.h
index acadcb544..5201a59ff 100644
--- a/libc/inet/netlinkaccess.h
+++ b/libc/inet/netlinkaccess.h
@@ -19,6 +19,8 @@
#ifndef _NETLINKACCESS_H
#define _NETLINKACCESS_H 1
+#ifdef __UCLIBC_USE_NETLINK__
+
#include <features.h>
#include <stdint.h>
#include <unistd.h>
@@ -33,16 +35,6 @@ typedef int32_t __s32;
#include <linux/rtnetlink.h>
#include <linux/netlink.h>
-/* Should prob be a configure option or something */
-#ifndef __ASSUME_NETLINK_SUPPORT
-#ifdef __UCLIBC_USE_NETLINK__
-# define __ASSUME_NETLINK_SUPPORT 1
-#else
-# define __ASSUME_NETLINK_SUPPORT 0
-#endif
-#endif
-
-
struct netlink_res
{
struct netlink_res *next;
@@ -62,6 +54,10 @@ struct netlink_handle
};
+#ifndef __ASSUME_NETLINK_SUPPORT
+#define __ASSUME_NETLINK_SUPPORT 1
+#endif
+
#ifdef __UCLIBC_SUPPORT_AI_ADDRCONFIG__
#if __ASSUME_NETLINK_SUPPORT == 0
extern smallint __no_netlink_support attribute_hidden;
@@ -76,5 +72,8 @@ extern void __netlink_close (struct netlink_handle *h) attribute_hidden;
extern void __netlink_free_handle (struct netlink_handle *h) attribute_hidden;
extern int __netlink_request (struct netlink_handle *h, int type) attribute_hidden;
+#else /* __UCLIBC_USE_NETLINK__ */
+#define __ASSUME_NETLINK_SUPPORT 0
+#endif
-#endif /* netlinkaccess.h */
+#endif /* _NETLINKACCESS_H */