aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaohiro Aota <naota@gentoo.org>2012-05-26 16:06:28 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-26 11:50:23 -0700
commit1d0cfd02760c39c0c1ae0790d69391f29e19271e (patch)
tree7dd90a4239668b67fabe357f591d3a5fd61eb73b
parent12ba84c8dd6173b710e14d735e1576f09e7c9825 (diff)
downloaduemacs-1d0cfd02760c39c0c1ae0790d69391f29e19271e.tar.gz
Make uemacs build on FreeBSD.
See <https://bugs.gentoo.org/show_bug.cgi?id=387135>. Signed-off-by: Ulrich Müller <ulm@gentoo.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--Makefile3
-rw-r--r--posix.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 1038f4c..eb53a8a 100644
--- a/Makefile
+++ b/Makefile
@@ -42,6 +42,9 @@ CFLAGS=-O2 $(WARNINGS)
ifeq ($(uname_S),Linux)
DEFINES=-DAUTOCONF -DPOSIX -DUSG -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE=600
endif
+ifeq ($(uname_S),FreeBSD)
+ DEFINES=-DAUTOCONF -DPOSIX -DSYSV -D_FREEBSD_C_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE=600
+endif
ifeq ($(uname_S),Darwin)
DEFINES=-DAUTOCONF -DPOSIX -DSYSV -D_DARWIN_C_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE=600
endif
diff --git a/posix.c b/posix.c
index fc96bc0..85eef87 100644
--- a/posix.c
+++ b/posix.c
@@ -25,7 +25,7 @@
/* Since Mac OS X's termios.h doesn't have the following 2 macros, define them.
*/
-#if defined(SYSV) && defined(_DARWIN_C_SOURCE)
+#if defined(SYSV) && (defined(_DARWIN_C_SOURCE) || defined(_FREEBSD_C_SOURCE))
#define OLCUC 0000002
#define XCASE 0000004
#endif