libsepol: include module.c internal header in module_to_cil.c
PATCH 1/1 libsepol: include module.c internal header in module_to_cil.c
In module_to_cil.c, sepol_ppfile_to_module_package() calls functions from module.c without including the internal header. This makes building libsepol with "gcc -flto -fuse-ld=gold" fails when linking libsepol.so:
/tmp/ccHYAKVZ.ltrans21.ltrans.o:<artificial>:function sepol_ppfile_to_module_package: error: undefined reference to 'sepol_module_package_free' /tmp/ccHYAKVZ.ltrans21.ltrans.o:<artificial>:function sepol_ppfile_to_module_package: error: undefined reference to 'sepol_module_package_create' /tmp/ccHYAKVZ.ltrans21.ltrans.o:<artificial>:function sepol_ppfile_to_module_package: error: undefined reference to 'sepol_module_package_create'
collect2: error: ld returned 1 exit status
--- libsepol/src/module_to_cil.c | 1 + 1 file changed, 1 insertion(+)
libsepol/src/module_to_cil.c +1 -0
@@ -54,6 +54,7 @@#include "kernel_to_common.h" #include "private.h" +#include "module_internal.h" #ifdef __GNUC__# define UNUSED (x) UNUSED_ ## x __attribute__((__unused__))
Signature · 1 line
2.22.0
ack, you going to to merge this?
Quoted 38 lines · Nicolas Iooss
In
module_to_cil.c,sepol_ppfile_to_module_package()calls functions frommodule.cwithout including the internal header. This makes building libsepol with "gcc -flto -fuse-ld=gold" fails when linking libsepol.so:/tmp/ccHYAKVZ.ltrans21.ltrans.o:<artificial>:function
sepol_ppfile_to_module_package: error: undefined reference to 'sepol_module_package_free' /tmp/ccHYAKVZ.ltrans21.ltrans.o:<artificial>:functionsepol_ppfile_to_module_package: error: undefined reference to 'sepol_module_package_create' /tmp/ccHYAKVZ.ltrans21.ltrans.o:<artificial>:functionsepol_ppfile_to_module_package: error: undefined reference to 'sepol_module_package_create'
collect2: error: ld returned 1 exit statusSigned-off-by Nicolas Iooss <[email protected]>--- libsepol/src/module_to_cil.c | 1 + 1 file changed, 1 insertion(+)libsepol/src/module_to_cil.c +1
-1@@ -54,6 +54,7 @@#include "kernel_to_common.h" #include "private.h" +#include "module_internal.h" #ifdef __GNUC__# define UNUSED (x) UNUSED_ ## x __attribute__((__unused__)) --2.22.0
Quoted 2 lines · William Roberts
ack, you going to to merge this?
Yes, I merged it.
Thanks,
Nicolas
Quoted 39 lines · Nicolas Iooss
Quoted 38 lines
In
module_to_cil.c,sepol_ppfile_to_module_package()calls functions frommodule.cwithout including the internal header. This makes building libsepol with "gcc -flto -fuse-ld=gold" fails when linking libsepol.so:/tmp/ccHYAKVZ.ltrans21.ltrans.o:<artificial>:function
sepol_ppfile_to_module_package: error: undefined reference to 'sepol_module_package_free' /tmp/ccHYAKVZ.ltrans21.ltrans.o:<artificial>:functionsepol_ppfile_to_module_package: error: undefined reference to 'sepol_module_package_create' /tmp/ccHYAKVZ.ltrans21.ltrans.o:<artificial>:functionsepol_ppfile_to_module_package: error: undefined reference to 'sepol_module_package_create'
collect2: error: ld returned 1 exit statusSigned-off-by Nicolas Iooss <[email protected]>--- libsepol/src/module_to_cil.c | 1 + 1 file changed, 1 insertion(+)libsepol/src/module_to_cil.c +1
-1@@ -54,6 +54,7 @@#include "kernel_to_common.h" #include "private.h" +#include "module_internal.h" #ifdef __GNUC__# define UNUSED (x) UNUSED_ ## x __attribute__((__unused__)) --2.22.0