Commit Diff


commit - 68069cf6014c5bd18aba4f3fa754c793c6740b3d
commit + 8cff5e95a33fae159bff83b798f8c0425e2aff5c
blob - d1dfccf0c74953cb001757a0816d89a67e813c77
blob + f77680096ad1835f084e287eb76deab4463f3a4e
--- configure.ac
+++ configure.ac
@@ -199,9 +199,6 @@ AC_FUNC_REALLOC
 AC_FUNC_STRERROR_R
 AC_FUNC_STRNLEN
 AC_CHECK_FUNCS([ \
-	SHA256Update \
-	SHA384Update \
-	SHA512Update \
 	dup2 \
 	flock \
 	getcwd \
@@ -374,6 +371,17 @@ AM_CONDITIONAL([HOST_DARWIN], [test "$PLATFORM" = "dar
 AM_CONDITIONAL([HOST_NETBSD], [test "$PLATFORM" = "netbsd"])
 AM_CONDITIONAL([HOST_OPENBSD], [test "$PLATFORM" = "openbsd"])
 AM_CONDITIONAL([HOST_DRAGONFLYBSD], [test "$PLATFORM" = "dragonflybsd"])
+
+# On OpenBSD, these functions are already defined, yet looking for them in
+# this way on OpenBSD breaks <sha2.h> inclusion.
+# FIXME: this needs addressing.
+if test "x$PLATFORM" != "xopenbsd"; then
+	AC_CHECK_FUNCS([ \
+		SHA256Update \
+		SHA384Update \
+		SHA512Update \
+	])
+fi
 
 # Look for yacc.
 if test "YACC_OVERRIDE" = "yes" && test -n "$YACC" \
blob - 356d4183db0c1a3595729548617393b185bfed4e
blob + ec546e4b8d53c0c0e01752af08638c7ca5683bfd
--- include/got_compat2.h
+++ include/got_compat2.h
@@ -57,12 +57,12 @@
 
 #ifndef __GNUC__
 #define __attribute__(a)
-#endif
-
 #ifndef __bounded__
 #define __bounded__(a, b, c)
+#endif
 #endif
 
+
 /* For flock. */
 #ifndef O_EXLOCK
 #define O_EXLOCK 0
@@ -190,6 +190,8 @@ void uuid_to_string(uuid_t *, char **, uint32_t *);
 
 #ifndef HAVE_IMSG
 #include "compat/imsg.h"
+#else
+#include <imsg.h>
 #endif
 
 #ifndef HAVE_SIPHASH
blob - 3ea305d9dc41eabfab9d1cff1c9f83bf8d7d35ef
blob + 299f3682f61bd510e620a6076c193ef7618a2806
--- lib/pack.c
+++ lib/pack.c
@@ -13,6 +13,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
+#include "got_compat.h"
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -32,7 +33,6 @@
 #include <unistd.h>
 #include <zlib.h>
 
-#include "got_compat.h"
 #include "got_error.h"
 #include "got_object.h"
 #include "got_path.h"
blob - f42a90c04863d0eab79b0081e400a893398b95c3
blob + 69db1b62f61595b11b2453541594232eac2441ec
--- libexec/got-fetch-pack/Makefile.am
+++ libexec/got-fetch-pack/Makefile.am
@@ -18,7 +18,7 @@ got_fetch_pack_SOURCES = \
 got_fetch_pack_DEPENDENCIES = $(top_builddir)/compat/libopenbsd-compat.a
 
 LDADD = -L$(top_builddir)/compat -lopenbsd-compat
-LDADD += $(zlib_LIBS) $(libbsd_LIBS)
+LDADD += $(zlib_LIBS) $(libbsd_LIBS) $(libutil_LIBS)
 if HOST_FREEBSD
 LDADD += -lmd
 endif