mirror of
https://github.com/jorisvink/kore
synced 2025-03-09 12:39:01 -04:00
Fix building example module in OpenBSD.
This commit is contained in:
parent
c64d3e7854
commit
ee99503323
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2013 Joris Vink <joris@coders.se>
|
||||
#
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <ctype.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -87,8 +88,15 @@ main(int argc, char *argv[])
|
||||
close(fd);
|
||||
|
||||
printf("};\n\n");
|
||||
printf("u_int32_t static_len_%s_%s = %ld;\n", ext, argv[2], st.st_size);
|
||||
printf("time_t static_mtime_%s_%s = %ld;\n", ext, argv[2], st.st_mtime);
|
||||
printf("u_int32_t static_len_%s_%s = %" PRId64 ";\n",
|
||||
ext, argv[2], st.st_size);
|
||||
|
||||
#if defined(OpenBSD)
|
||||
printf("time_t static_mtime_%s_%s = %d;\n", ext, argv[2], st.st_mtime);
|
||||
#else
|
||||
printf("time_t static_mtime_%s_%s = %" PRId64 ";\n",
|
||||
ext, argv[2], st.st_mtime);
|
||||
#endif
|
||||
|
||||
fprintf(hdr, "extern u_int8_t static_%s_%s[];\n", ext, argv[2]);
|
||||
fprintf(hdr, "extern u_int32_t static_len_%s_%s;\n", ext, argv[2]);
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <ctype.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -87,8 +88,15 @@ main(int argc, char *argv[])
|
||||
close(fd);
|
||||
|
||||
printf("};\n\n");
|
||||
printf("u_int32_t static_len_%s_%s = %ld;\n", ext, argv[2], st.st_size);
|
||||
printf("time_t static_mtime_%s_%s = %ld;\n", ext, argv[2], st.st_mtime);
|
||||
printf("u_int32_t static_len_%s_%s = %" PRId64 ";\n",
|
||||
ext, argv[2], st.st_size);
|
||||
|
||||
#if defined(OpenBSD)
|
||||
printf("time_t static_mtime_%s_%s = %d;\n", ext, argv[2], st.st_mtime);
|
||||
#else
|
||||
printf("time_t static_mtime_%s_%s = %" PRId64 ";\n",
|
||||
ext, argv[2], st.st_mtime);
|
||||
#endif
|
||||
|
||||
fprintf(hdr, "extern u_int8_t static_%s_%s[];\n", ext, argv[2]);
|
||||
fprintf(hdr, "extern u_int32_t static_len_%s_%s;\n", ext, argv[2]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user