Browse code

remove duplicate code, and fix build error (bb #1034)

git-svn: trunk@3859

Török Edvin authored on 2008/05/25 04:27:48
Showing 4 changed files
... ...
@@ -1,3 +1,8 @@
1
+Sat May 24 21:38:47 EEST 2008 (edwin)
2
+-------------------------------------
3
+  * clamd/others.c, session.c, m4/fdpassing.m4:
4
+	remove duplicate code, and fix build error (bb #1034)
5
+
1 6
 Wed May 21 15:51:32 CEST 2008 (tk)
2 7
 ----------------------------------
3 8
   * freshclam/fresclam.c: don't call daemonize() under w32 (bb#1002)
... ...
@@ -41,8 +41,10 @@
41 41
 
42 42
 #include <sys/socket.h>
43 43
 #ifdef HAVE_FD_PASSING
44
+#ifdef HAVE_SYS_UIO_H
44 45
 #include <sys/uio.h>
45 46
 #endif
47
+#endif
46 48
 
47 49
 #include <sys/time.h>
48 50
 #endif
... ...
@@ -18771,9 +18771,13 @@ cat >>conftest.$ac_ext <<_ACEOF
18771 18771
 /* end confdefs.h.  */
18772 18772
 
18773 18773
 #define _XOPEN_SOURCE 500
18774
+#ifdef HAVE_SYS_TYPES_H
18774 18775
 #include <sys/types.h>
18776
+#endif
18775 18777
 #include <sys/socket.h>
18778
+#ifdef HAVE_SYS_UIO_H
18776 18779
 #include <sys/uio.h>
18780
+#endif
18777 18781
 
18778 18782
 int
18779 18783
 main ()
... ...
@@ -18850,13 +18854,17 @@ cat >>conftest.$ac_ext <<_ACEOF
18850 18850
 /* end confdefs.h.  */
18851 18851
 
18852 18852
 
18853
+#ifdef HAVE_SYS_TYPES_H
18853 18854
 #include <sys/types.h>
18855
+#endif
18854 18856
 #include <sys/wait.h>
18855 18857
 #include <stdio.h>
18856 18858
 #include <stdlib.h>
18857 18859
 #include <unistd.h>
18858 18860
 #include <string.h>
18861
+#ifdef HAVE_SYS_UIO_H
18859 18862
 #include <sys/uio.h>
18863
+#endif
18860 18864
 #include <signal.h>
18861 18865
 #include <sys/socket.h>
18862 18866
 
... ...
@@ -19026,13 +19034,17 @@ cat >>conftest.$ac_ext <<_ACEOF
19026 19026
 /* end confdefs.h.  */
19027 19027
 
19028 19028
 #define _XOPEN_SOURCE 500
19029
+#ifdef HAVE_SYS_TYPES_H
19029 19030
 #include <sys/types.h>
19031
+#endif
19030 19032
 #include <sys/wait.h>
19031 19033
 #include <stdio.h>
19032 19034
 #include <stdlib.h>
19033 19035
 #include <unistd.h>
19034 19036
 #include <string.h>
19037
+#ifdef HAVE_SYS_UIO_H
19035 19038
 #include <sys/uio.h>
19039
+#endif
19036 19040
 #include <signal.h>
19037 19041
 #include <sys/socket.h>
19038 19042
 
... ...
@@ -2,13 +2,17 @@
2 2
 AC_DEFUN([CONFTEST_FDPASS],[[
3 3
 AC_LANG_SOURCE([[
4 4
 $1 
5
+#ifdef HAVE_SYS_TYPES_H
5 6
 #include <sys/types.h>
7
+#endif
6 8
 #include <sys/wait.h>
7 9
 #include <stdio.h>
8 10
 #include <stdlib.h>
9 11
 #include <unistd.h>
10 12
 #include <string.h>
13
+#ifdef HAVE_SYS_UIO_H
11 14
 #include <sys/uio.h>
15
+#endif
12 16
 #include <signal.h>
13 17
 #include <sys/socket.h>
14 18
 
... ...
@@ -140,9 +144,13 @@ AC_CACHE_CHECK([for msg_control field in struct msghdr],
140 140
     AC_TRY_COMPILE(
141 141
 [
142 142
 #define _XOPEN_SOURCE 500
143
+#ifdef HAVE_SYS_TYPES_H
143 144
 #include <sys/types.h>
145
+#endif
144 146
 #include <sys/socket.h>
147
+#ifdef HAVE_SYS_UIO_H
145 148
 #include <sys/uio.h>
149
+#endif
146 150
 ],
147 151
 [
148 152
 #ifdef msg_control