Skip to content

Commit bd7791d

Browse files
committed
Support libbsd 0.2.0 (header file has moved)
1 parent aad1530 commit bd7791d

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

configure.ac

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,10 @@ AC_SUBST([regular_CFLAGS])
9595
# Checks for header files.
9696
PKG_CHECK_MODULES([x11], [x11])
9797
PKG_CHECK_MODULES([glib], [glib-2.0])
98-
AS_IF([test "x$with_pidfile" != xno],
99-
[PKG_CHECK_MODULES([libbsd], [libbsd >= 0.2.0])])
98+
AS_IF([test "x$with_pidfile" != xno], [
99+
PKG_CHECK_MODULES([libbsd], [libbsd >= 0.2.0])
100+
PKG_CHECK_EXISTS([libbsd = 0.2.0], [AC_DEFINE(HAVE_LIBBSD_020)])
101+
])
100102

101103
AC_CONFIG_FILES([Makefile])
102104
AC_OUTPUT

src/bumblebeed.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,12 @@
3434
#include <errno.h>
3535
#include <getopt.h>
3636
#ifdef WITH_PIDFILE
37+
#ifdef HAVE_LIBBSD_020
38+
#include <libutil.h>
39+
#else
3740
#include <bsd/libutil.h>
3841
#endif
42+
#endif
3943
#include "bbconfig.h"
4044
#include "bbsocket.h"
4145
#include "bblogger.h"

0 commit comments

Comments
 (0)