summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorewt <devnull@localhost>1997-05-07 19:27:21 +0000
committerewt <devnull@localhost>1997-05-07 19:27:21 +0000
commit49a247317a3b5a31f2a3f8a0ebe867aae78de077 (patch)
treeabc162ce37e1347cbf315d11bc6d1d5ca50397e1
parentf3b683a4b0cbd32a4c29a76ef6804406362d7fd4 (diff)
downloadlibrpm-tizen-49a247317a3b5a31f2a3f8a0ebe867aae78de077.tar.gz
librpm-tizen-49a247317a3b5a31f2a3f8a0ebe867aae78de077.tar.bz2
librpm-tizen-49a247317a3b5a31f2a3f8a0ebe867aae78de077.zip
Include sys/socket.h if it's available
CVS patchset: 1614 CVS date: 1997/05/07 19:27:21
-rw-r--r--config.h.in3
-rw-r--r--configure.in2
-rw-r--r--ftp.c5
-rw-r--r--misc/miscfn.h4
4 files changed, 13 insertions, 1 deletions
diff --git a/config.h.in b/config.h.in
index 0c9f33059..38b7feec5 100644
--- a/config.h.in
+++ b/config.h.in
@@ -19,6 +19,9 @@
/* Define as 1 if you have <machine/types.h> */
#define MACHINE_TYPES_H 0
+/* Define as 1 if you have <sys/socket.h> */
+#define MACHINE_SYS_SOCKET_H 0
+
/* Define as 1 if you have <glob.h> */
#define HAVE_GLOB_H 0
diff --git a/configure.in b/configure.in
index b568f0abe..6e42b25d7 100644
--- a/configure.in
+++ b/configure.in
@@ -218,7 +218,7 @@ dnl Checks for header files we can live without.
AC_HEADER_STDC
AC_HEADER_MAJOR
AC_CHECK_HEADERS(netinet/in_systm.h limits.h)
-AC_CHECK_HEADERS(alloca.h dirent.h)
+AC_CHECK_HEADERS(alloca.h dirent.h sys/socket.h)
AC_CHECK_HEADERS(machine/types.h string.h)
AC_CHECK_HEADERS(glob.h,,MISCOBJS="$MISCOBJS glob.o")
AC_CHECK_HEADERS(fnmatch.h,,MISCOBJS="$MISCOBJS fnmatch.o")
diff --git a/ftp.c b/ftp.c
index a64c930b5..931dfaf2f 100644
--- a/ftp.c
+++ b/ftp.c
@@ -4,6 +4,7 @@
#define HAVE_MACHINE_TYPES_H 1
#define HAVE_ALLOCA_H 1
#define HAVE_NETINET_IN_SYSTM_H 1
+#define HAVE_SYS_SOCKET_H 1
#endif
#if HAVE_MACHINE_TYPES_H
@@ -14,6 +15,10 @@
# include <alloca.h>
#endif
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
#if HAVE_NETINET_IN_SYSTM_H
# include <sys/types.h>
# include <netinet/in_systm.h>
diff --git a/misc/miscfn.h b/misc/miscfn.h
index bd033a067..a0831e715 100644
--- a/misc/miscfn.h
+++ b/misc/miscfn.h
@@ -50,4 +50,8 @@ extern time_t timezone;
extern void *myrealloc(void *, size_t);
#endif
+#if HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
#endif