summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2012-06-30 00:49:22 +0000
committerIgor Pashev <pashev.igor@gmail.com>2012-06-30 00:49:22 +0000
commit713e0b97d87427f7402531dc46c6e6c27624ded1 (patch)
treeff319b5210895e839512721062c635e80e75e2a7
parent23ce3c23dc9ef04cd5cc7dbde44440018857263d (diff)
downloadsunmake-713e0b97d87427f7402531dc46c6e6c27624ded1.tar.gz
Build libbsd
-rw-r--r--Makefile.am5
-rw-r--r--configure.ac1
-rw-r--r--usr/src/make_src/Make/lib/bsd/src/bsd.cc12
3 files changed, 17 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 166c4ea..5eef46a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,10 +1,13 @@
AM_CPPFLAGS = -DTEXT_DOMAIN=\"SUNW_OST_OSLIB\"
AM_CPPFLAGS += -DNDEBUG
-lib_LTLIBRARIES = libmakestate.la
+lib_LTLIBRARIES = libmakestate.la libbsd.la
libmakestate_la_LDFLAGS = -version-info 1:0:0
libmakestate_la_SOURCES = \
usr/src/make_src/Make/lib/makestate/src/ld_file.c \
usr/src/make_src/Make/lib/makestate/src/lock.c
+libbsd_la_LDFLAGS = -static
+libbsd_la_SOURCES = \
+usr/src/make_src/Make/lib/bsd/src/bsd.cc
diff --git a/configure.ac b/configure.ac
index 60923d9..814f580 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,6 +35,7 @@ AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_CHECK_DECLS([sys_siglist])
+AC_CHECK_TYPES([u_int16_t])
# Checks for library functions.
AC_FUNC_CHOWN
diff --git a/usr/src/make_src/Make/lib/bsd/src/bsd.cc b/usr/src/make_src/Make/lib/bsd/src/bsd.cc
index c61bca2..ee23fc6 100644
--- a/usr/src/make_src/Make/lib/bsd/src/bsd.cc
+++ b/usr/src/make_src/Make/lib/bsd/src/bsd.cc
@@ -28,8 +28,20 @@
#pragma ident "@(#)bsd.cc 1.6 06/12/12"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <signal.h>
+#ifndef HAVE_U_INT16_T
+/* bsd headers from Debian use u_intX_t, not uintX_t */
+typedef uint8_t u_int8_t;
+typedef uint16_t u_int16_t;
+typedef uint32_t u_int32_t;
+typedef uint64_t u_int64_t;
+#endif
+
#include <bsd/bsd.h>
/* External references.