Permalink
Browse files

PATCH: fix some warnings during configure/compilation

Hi,

The diff below fixes one warning during configure and two during compilation on OpenBSD (and maybe elsewhere):

checking pthread_np.h usability... no
checking pthread_np.h presence... yes
configure: WARNING: pthread_np.h: present but cannot be compiled
configure: WARNING: pthread_np.h:     check for missing prerequisite headers?
configure: WARNING: pthread_np.h: see the Autoconf documentation
configure: WARNING: pthread_np.h:     section "Present But Cannot Be Compiled"
configure: WARNING: pthread_np.h: proceeding with the compiler's result
configure: WARNING:     ## -------------------------------------------- ##
configure: WARNING:     ## Report this to varnish-dev@varnish-cache.org ##
configure: WARNING:     ## -------------------------------------------- ##

varnishadm.c:190: warning: implicit declaration of function 'add_history'

cache/cache_main.c:82: warning: implicit declaration of function 'pthread_set_name_np'

Comments? OK?

f.-
  • Loading branch information...
fgsch authored and Tollef Fog Heen committed Nov 16, 2012
1 parent 89bf18a commit ae52a41451d36bb331903f1485a80af0d972fba6
Showing with 5 additions and 1 deletion.
  1. +3 −0 bin/varnishadm/varnishadm.c
  2. +2 −1 configure.ac
@@ -41,6 +41,9 @@
# else
# include <editline/readline.h>
# endif
+# ifdef HAVE_READLINE_HISTORY_H
+# include <readline/history.h>
+# endif
#endif
#include <errno.h>
View
@@ -148,6 +148,7 @@ PKG_CHECK_MODULES([LIBEDIT], [libedit],
[AC_DEFINE([HAVE_LIBEDIT], [1], [Define we have libedit])],
[AC_CHECK_HEADERS([readline/readline.h])
AC_CHECK_HEADERS([edit/readline/readline.h])
+ AC_CHECK_HEADERS([readline/history.h])
AC_CHECK_LIB(edit, el_init,
[ AC_DEFINE([HAVE_LIBEDIT], [1], [Define we have libedit])
LIBEDIT_CFLAGS=""
@@ -171,7 +172,7 @@ AC_CHECK_HEADERS([sys/vfs.h])
AC_CHECK_HEADERS([endian.h])
AC_CHECK_HEADERS([execinfo.h])
AC_CHECK_HEADERS([netinet/in.h])
-AC_CHECK_HEADERS([pthread_np.h])
+AC_CHECK_HEADERS([pthread_np.h], [], [], [#include <pthread.h>])
AC_CHECK_HEADERS([stddef.h])
AC_CHECK_HEADERS([stdlib.h])
AC_CHECK_HEADERS([unistd.h])

0 comments on commit ae52a41

Please sign in to comment.