fix more compile errors
authorFelix Fietkau <nbd@openwrt.org>
Sat, 2 Feb 2008 23:46:08 +0000 (00:46 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 2 Feb 2008 23:46:08 +0000 (00:46 +0100)
Makefile
file.c
libuci.c

index 65a38c7..766fccb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -20,8 +20,9 @@ ifeq ($(OS),Darwin)
   SHLIB_EXT=dylib
   SHLIB_FLAGS=-dylib
 else
   SHLIB_EXT=dylib
   SHLIB_FLAGS=-dylib
 else
+  LD=gcc
   SHLIB_EXT=so
   SHLIB_EXT=so
-  SHLIB_FLAGS=-shared -Wl,soname,$(SHLIB_FILE)
+  SHLIB_FLAGS=-shared -Wl,-soname,$(SHLIB_FILE)
 endif
 SHLIB_FILE=libuci.$(SHLIB_EXT).$(VERSION)
 
 endif
 SHLIB_FILE=libuci.$(SHLIB_EXT).$(VERSION)
 
diff --git a/file.c b/file.c
index ae58fbc..803e912 100644 (file)
--- a/file.c
+++ b/file.c
  * This file contains the code for parsing uci config files
  */
 
  * This file contains the code for parsing uci config files
  */
 
+#define _GNU_SOURCE
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <sys/file.h>
 #include <stdbool.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <stdbool.h>
 #include <unistd.h>
 #include <fcntl.h>
index 51ce7da..d4ef8d8 100644 (file)
--- a/libuci.c
+++ b/libuci.c
@@ -16,6 +16,7 @@
  * This file contains some common code for the uci library
  */
 
  * This file contains some common code for the uci library
  */
 
+#define _GNU_SOURCE
 #include <sys/types.h>
 #include <stdbool.h>
 #include <string.h>
 #include <sys/types.h>
 #include <stdbool.h>
 #include <string.h>