Skip to content

Commit f83783c

Browse files
authored
fix(copyfile): inline linux/version.h (#12901)
The kernel headers cannot be expected to be available on every linux distribution. The version header can therefore be inlined easily. In the kernel, the generated file looks like: ``` define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + \ ((c) > 255 ? 255 : (c)))'; ``` but we don't really need the extra check on `c`. fix #12896.
2 parents 18d4f9b + 6db1184 commit f83783c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

otherlibs/stdune/src/copyfile_stubs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ CAMLprim value stdune_sendfile(value v_in, value v_out, value v_size) {
6464

6565
#include <sys/sendfile.h>
6666
#include <sys/utsname.h>
67-
#include <linux/version.h>
6867
#include <dlfcn.h>
6968
#include <stdio.h>
7069

70+
#define KERNEL_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
7171
#define FD_val(value) Int_val(value)
7272

7373
CAMLprim value stdune_copyfile(value v_from, value v_to) {

0 commit comments

Comments
 (0)