summaryrefslogtreecommitdiffstats
path: root/daemon/lua/kres-gen.sh
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/lua/kres-gen.sh')
-rwxr-xr-xdaemon/lua/kres-gen.sh15
1 files changed, 9 insertions, 6 deletions
diff --git a/daemon/lua/kres-gen.sh b/daemon/lua/kres-gen.sh
index 70afb40..3befd5d 100755
--- a/daemon/lua/kres-gen.sh
+++ b/daemon/lua/kres-gen.sh
@@ -53,12 +53,15 @@ printf -- "local ffi = require('ffi')\n"
printf -- "--[[ This file is generated by ./kres-gen.sh ]] ffi.cdef[[\n"
# Some system dependencies. TODO: this generated part isn't perfectly portable.
-${CDEFS} ${LIBKRES} types <<-EOF
- typedef time_t
- __time_t
- __suseconds_t
- struct timeval
-EOF
+printf "
+typedef @time_t@ time_t;
+typedef @time_t@ __time_t;
+typedef @time_t@ __suseconds_t;
+struct timeval {
+ __time_t tv_sec;
+ __suseconds_t tv_usec;
+};
+"
## Various types (mainly), from libknot and libkres