[Asterisk-Dev] PATCH: Little change so acl.c will compile on my older glibc

Stephen Davies steve at daviesfam.org
Wed May 7 13:28:15 MST 2003


Hi,

To build recent acl.c on my older glibc, I needed to:

1) Add extra includes to get in_addr defined
2) Add a typedef for in_addr_t

Patch attached (or, just treat this as a bug report)

Regards,
Steve

-------------- next part --------------
Index: acl.c
===================================================================
RCS file: /usr/cvsroot/asterisk/acl.c,v
retrieving revision 1.6
diff -u -r1.6 acl.c
--- acl.c	5 May 2003 06:14:25 -0000	1.6
+++ acl.c	7 May 2003 18:54:52 -0000
@@ -21,6 +21,8 @@
 #include <unistd.h>
 #include <asterisk/acl.h>
 #include <asterisk/logger.h>
+#include <sys/types.h>
+#include <netinet/in.h>
 #include <arpa/inet.h>
 #include <sys/socket.h>
 #include <netdb.h>
@@ -39,6 +41,9 @@
 	int sense;
 	struct ast_ha *next;
 };
+
+/* SLD: Missing from older glib: */
+typedef u_int32_t       in_addr_t;      /* base type for internet address */
 
 /* Default IP - if not otherwise set, don't breathe garbage */
 static struct in_addr __ourip = { (in_addr_t)0x00000000 };


More information about the asterisk-dev mailing list