diff options
Diffstat (limited to 'libbridge')
-rw-r--r-- | libbridge/Android.mk | 17 | ||||
-rw-r--r-- | libbridge/config.h | 80 | ||||
-rw-r--r-- | libbridge/libbridge.h | 4 | ||||
-rw-r--r-- | libbridge/libbridge_devif.c | 5 | ||||
-rw-r--r-- | libbridge/libbridge_if.c | 4 | ||||
-rw-r--r-- | libbridge/libbridge_private.h | 2 |
6 files changed, 108 insertions, 4 deletions
diff --git a/libbridge/Android.mk b/libbridge/Android.mk new file mode 100644 index 0000000..7f73ab2 --- /dev/null +++ b/libbridge/Android.mk @@ -0,0 +1,17 @@ +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_SRC_FILES:=\ + libbridge_devif.c \ + libbridge_if.c \ + libbridge_init.c \ + libbridge_misc.c + +LOCAL_CFLAGS:= -Wall -O2 -g +LOCAL_CFLAGS += -DFEATURE_ANDROID + +LOCAL_SYSTEM_SHARED_LIBRARIES := libc libcutils +LOCAL_MODULE:= libbridge +LOCAL_MODULE_TAGS := optional + +include $(BUILD_STATIC_LIBRARY) diff --git a/libbridge/config.h b/libbridge/config.h new file mode 100644 index 0000000..774b9e7 --- /dev/null +++ b/libbridge/config.h @@ -0,0 +1,80 @@ +/* libbridge/config.h. Generated from config.h.in by configure. */ +/* libbridge/config.h.in. Generated from configure.in by autoheader. */ + +/* Define to 1 if you have the `gethostname' function. */ +#define HAVE_GETHOSTNAME 1 + +/* Define to 1 if you have the `if_indextoname' function. */ +#define HAVE_IF_INDEXTONAME 1 + +/* Define to 1 if you have the `if_nametoindex' function. */ +#define HAVE_IF_NAMETOINDEX 1 + +/* Define to 1 if you have the <inttypes.h> header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the <memory.h> header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `socket' function. */ +#define HAVE_SOCKET 1 + +/* Define to 1 if you have the <stdint.h> header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the <stdlib.h> header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the <strings.h> header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the <string.h> header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the <sys/ioctl.h> header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the <sys/time.h> header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the <sys/types.h> header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the `uname' function. */ +#define HAVE_UNAME 1 + +/* Define to 1 if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "bridge-utils" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "bridge-utils 1.5" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "bridge-utils" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.5" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ +#define TIME_WITH_SYS_TIME 1 + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ diff --git a/libbridge/libbridge.h b/libbridge/libbridge.h index 39964f2..e7506e0 100644 --- a/libbridge/libbridge.h +++ b/libbridge/libbridge.h @@ -22,7 +22,9 @@ #include <sys/socket.h> #include <linux/if.h> #include <linux/if_bridge.h> - +#ifdef FEATURE_ANDROID +#include <sys/time.h> +#endif /* defined in net/if.h but that conflicts with linux/if.h... */ extern unsigned int if_nametoindex (const char *__ifname); extern char *if_indextoname (unsigned int __ifindex, char *__ifname); diff --git a/libbridge/libbridge_devif.c b/libbridge/libbridge_devif.c index 1e83925..99a0de0 100644 --- a/libbridge/libbridge_devif.c +++ b/libbridge/libbridge_devif.c @@ -23,8 +23,11 @@ #include <errno.h> #include <string.h> #include <dirent.h> +#ifndef FEATURE_ANDROID #include <sys/fcntl.h> - +#else +#include <fcntl.h> +#endif #include "libbridge.h" #include "libbridge_private.h" diff --git a/libbridge/libbridge_if.c b/libbridge/libbridge_if.c index 77d3f8a..3df9fd7 100644 --- a/libbridge/libbridge_if.c +++ b/libbridge/libbridge_if.c @@ -20,7 +20,11 @@ #include <stdlib.h> #include <errno.h> #include <string.h> +#ifndef FEATURE_ANDROID #include <sys/fcntl.h> +#else +#include <fcntl.h> +#endif #include <sys/ioctl.h> #include "libbridge.h" diff --git a/libbridge/libbridge_private.h b/libbridge/libbridge_private.h index 99a511d..f0fe394 100644 --- a/libbridge/libbridge_private.h +++ b/libbridge/libbridge_private.h @@ -18,9 +18,7 @@ #ifndef _LIBBRIDGE_PRIVATE_H #define _LIBBRIDGE_PRIVATE_H - #include "config.h" - #include <linux/sockios.h> #include <sys/time.h> #include <sys/ioctl.h> |