summaryrefslogtreecommitdiffstats
path: root/package/hostapd-rtk/patches/009-hostapd-from-3.2.4.patch
blob: 64ea8cc4e1ca5fb440b1143b80c5c635ee6a8a9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
diff -purbB --unidirectional-new-file -x '.*' -x '*.o' hostapd-rtk-0.6.10/hostapd/Makefile hostapd-0.6.10/hostapd/Makefile
--- hostapd-rtk-0.6.10/hostapd/Makefile	2013-05-18 17:49:32.433577219 +0300
+++ hostapd-0.6.10/hostapd/Makefile	2013-05-02 01:48:29.296224179 +0300
@@ -3,9 +3,11 @@ CC=gcc
 endif
 
 ifndef CFLAGS
-CFLAGS = -MMD -O2 -Wall -g
+CFLAGS = -MMD -Wall -g
 endif
 
+CFLAGS += -Os
+
 # define HOSTAPD_DUMP_STATE to include SIGUSR1 handler for dumping state to
 # a file (undefine it, if you want to save in binary size)
 CFLAGS += -DHOSTAPD_DUMP_STATE
diff -purbB --unidirectional-new-file -x '.*' -x '*.o' hostapd-rtk-0.6.10/src/utils/os_unix.c hostapd-0.6.10/src/utils/os_unix.c
--- hostapd-rtk-0.6.10/src/utils/os_unix.c	2013-05-18 17:49:32.321577228 +0300
+++ hostapd-0.6.10/src/utils/os_unix.c	2013-05-02 01:48:29.767224141 +0300
@@ -113,10 +113,11 @@ static int os_daemon(int nochdir, int no
 
 int os_daemonize(const char *pid_file)
 {
-#ifdef __uClinux__
-	return -1;
-#else /* __uClinux__ */
-	if (os_daemon(0, 1)) {
+#ifndef RTK_HAPD
+	if (daemon(0, 0)) {
+#else
+	if (daemon(0, 1)) {
+#endif
 		perror("daemon");
 		return -1;
 	}
@@ -130,7 +131,6 @@ int os_daemonize(const char *pid_file)
 	}
 
 	return -0;
-#endif /* __uClinux__ */
 }