summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-05-16 21:08:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:16:48 -0500
commita0e786c4464a0b25574093295751afd906034c6b (patch)
tree05a1362fec72979e82754ae4d1f9da8955832129
parentd29f44c594f4857593e361e9e31eef3cec1a912c (diff)
downloadsamba-a0e786c4464a0b25574093295751afd906034c6b.tar.gz
samba-a0e786c4464a0b25574093295751afd906034c6b.tar.bz2
samba-a0e786c4464a0b25574093295751afd906034c6b.zip
r6828: More portability fixes
(This used to be commit f46c532883e18b8780ff73d3ac0899690eeab3f4)
-rw-r--r--source4/build/smb_build/makefile.pm2
-rw-r--r--source4/lib/talloc/Makefile.in2
-rw-r--r--source4/lib/talloc/configure.in2
-rw-r--r--source4/lib/talloc/talloc.c9
4 files changed, 12 insertions, 3 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index f9221879bf..1eb1c6ea00 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -85,7 +85,7 @@ sub _prepare_compiler_linker($)
$output = << '__EOD__';
CC=@CC@
-CC_FLAGS=-Iinclude -I. -I$(srcdir)/include -I$(srcdir) -D_SAMBA_BUILD_ -Ilib @CFLAGS@ @CPPFLAGS@
+CC_FLAGS=-Iinclude -I. -I$(srcdir)/include -I$(srcdir) -D_SAMBA_BUILD_ -DHAVE_CONFIG_H -Ilib @CFLAGS@ @CPPFLAGS@
LD=@CC@
LD_FLAGS=@LDFLAGS@ @CFLAGS@
diff --git a/source4/lib/talloc/Makefile.in b/source4/lib/talloc/Makefile.in
index 6efa9e1920..f11124e707 100644
--- a/source4/lib/talloc/Makefile.in
+++ b/source4/lib/talloc/Makefile.in
@@ -6,7 +6,7 @@ mandir = @mandir@
XSLTPROC = @XSLTPROC@
INSTALLCMD = @INSTALL@
CC = @CC@
-CFLAGS=@CFLAGS@
+CFLAGS = @CFLAGS@ -DHAVE_CONFIG_H=
LIBOBJ = talloc.o
diff --git a/source4/lib/talloc/configure.in b/source4/lib/talloc/configure.in
index 8e7e8252fd..d4afacc7a7 100644
--- a/source4/lib/talloc/configure.in
+++ b/source4/lib/talloc/configure.in
@@ -6,7 +6,7 @@ if test "x$GCC" = "xyes"; then
fi
AC_PROG_INSTALL
AC_PATH_PROG(XSLTPROC,xsltproc)
-AC_CHECK_HEADERS(stdint.h stdarg.h)
+AC_CHECK_HEADERS(stdint.h stdarg.h unistd.h sys/types.h)
AC_CONFIG_HEADER(config.h)
sinclude(config.m4)
AC_OUTPUT(Makefile talloc.pc)
diff --git a/source4/lib/talloc/talloc.c b/source4/lib/talloc/talloc.c
index d3fa961c74..8a29c8c014 100644
--- a/source4/lib/talloc/talloc.c
+++ b/source4/lib/talloc/talloc.c
@@ -27,12 +27,21 @@
*/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#ifdef HAVE_STDARG_H
#include <stdarg.h>