]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
FreeBSD support
authorNAKAMURA Takumi <takumi@ps.sakura.ne.jp>
Sun, 11 Sep 2005 11:09:56 +0000 (20:09 +0900)
committerRichard P. Curnow <rc@rc0.org.uk>
Fri, 14 Apr 2006 23:03:30 +0000 (00:03 +0100)
NAKAMURA Takumi writes:

I tried to compile chrony-1.21 on FreeBSD 4.8-RELEASE & 5.4-RELEASE.
I modify two files, configure, sysinc.h.

configure:
    add label "FreeBSD-i386" to "BSD/386" line
sysincl.h:
    1. FreeBSD obsoletes alloca.h
    2. FreeBSD use stdlib.h instead of malloc.h, to use malloc(), free()

Attached file includes the above modifications.

configure
sysincl.h

index 786e9e1c9743e507752e5c4999ba7ad483099989..914ebaa124331dd5d8779477db33c99d15c22670 100755 (executable)
--- a/configure
+++ b/configure
@@ -248,7 +248,7 @@ case $SYSTEM in
         fi
     ;;
 
-    BSD/386-i[3456]86 )
+    BSD/386-i[3456]86|FreeBSD-i386 )
         # Antti Jrvinen <costello@iki.fi> reported that this system can
         # be supported with the SunOS 4.x driver files.
         EXTRA_OBJECTS="sys_sunos.o strerror.o"
index fbbd2ffc8138290cfbac8fee892bc81f7544e586..4cb1da83af32a0812f92e137a7367623950b8bdb 100644 (file)
--- a/sysincl.h
+++ b/sysincl.h
@@ -35,7 +35,7 @@
 
 #if defined (SOLARIS) || defined(SUNOS) || defined(LINUX) || defined(__NetBSD__)
 
-#if !defined(__NetBSD__)
+#if !defined(__NetBSD__) && !defined(__FreeBSD__)
 #include <alloca.h>
 #endif
 #include <assert.h>
@@ -43,7 +43,9 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <float.h>
+#if !defined(__FreeBSD__)
 #include <malloc.h>
+#endif
 #include <math.h>
 #include <netdb.h>
 #include <netinet/in.h>