summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2021-08-23 15:26:20 -0700
committerVito Caputo <vcaputo@pengaru.com>2021-08-24 00:48:43 -0700
commitb53cc8e61a27f948df5f11da07c7c395ebae1dd1 (patch)
treec407bb502cf613dba971fba430ed999884bcf13b
parenteaaa33bcf846da64096c0ba595e0523eafa04206 (diff)
upstream: tie into build system
includes some miscellany to make compiler happy
-rw-r--r--configure.ac1
-rw-r--r--src/Makefile.am3
-rw-r--r--src/upstream/Makefile.am11
-rw-r--r--src/upstream/siphash24.c2
-rw-r--r--src/upstream/siphash24.h1
5 files changed, 17 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index da6d853..f164223 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,6 +25,7 @@ AC_CONFIG_SUBDIRS([
AC_CONFIG_FILES([
Makefile
src/Makefile
+ src/upstream/Makefile
])
AC_OUTPUT
diff --git a/src/Makefile.am b/src/Makefile.am
index ccccf37..92f89b8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,3 +1,4 @@
+SUBDIRS = upstream
bin_PROGRAMS = jio
jio_SOURCES = \
bootid.c \
@@ -24,4 +25,4 @@ jio_SOURCES = \
report-usage.h
jio_CPPFLAGS = -I@top_srcdir@/thunk_h -I@top_srcdir@/libiou/src
-jio_LDADD = @top_builddir@/libiou/src/libiou.a
+jio_LDADD = @top_builddir@/libiou/src/libiou.a @top_builddir@/src/upstream/libupstream.a
diff --git a/src/upstream/Makefile.am b/src/upstream/Makefile.am
new file mode 100644
index 0000000..60a65b1
--- /dev/null
+++ b/src/upstream/Makefile.am
@@ -0,0 +1,11 @@
+noinst_LIBRARIES = libupstream.a
+libupstream_a_SOURCES = \
+ _sd-common.h \
+ journal-def.h \
+ lookup3.h \
+ sd-id128.h \
+ siphash24.h \
+ sparse-endian.h \
+ unaligned.h \
+ lookup3.c \
+ siphash24.c
diff --git a/src/upstream/siphash24.c b/src/upstream/siphash24.c
index 1fb9393..da03974 100644
--- a/src/upstream/siphash24.c
+++ b/src/upstream/siphash24.c
@@ -23,6 +23,8 @@
#include "siphash24.h"
#include "unaligned.h"
+#define _fallthrough_
+
static uint64_t rotate_left(uint64_t x, uint8_t b) {
assert(b < 64);
diff --git a/src/upstream/siphash24.h b/src/upstream/siphash24.h
index 7f799ed..cce783a 100644
--- a/src/upstream/siphash24.h
+++ b/src/upstream/siphash24.h
@@ -1,6 +1,7 @@
#pragma once
#include <inttypes.h>
+#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
© All Rights Reserved