libpacketmark: fix call of initialization function
Rather than using the internal symbol _init, simply let the compiler handle it by marking it as a constructor. This fixes running the initialization on some architectures like ARM.
This commit is contained in:
parent
6d2b807fba
commit
5249974a3c
|
@ -1,9 +1,7 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libpacketmark
|
||||
PKG_VERSION:=1
|
||||
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||
PKG_VERSION:=2
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
|
|
@ -38,7 +38,8 @@ static int mark;
|
|||
static int (*socket_real)(int domain, int type, int protocol);
|
||||
|
||||
|
||||
void _init(void) {
|
||||
__attribute__((constructor))
|
||||
static void init(void) {
|
||||
const char *str = getenv("LIBPACKETMARK_MARK");
|
||||
if (str)
|
||||
mark = atoi(str);
|
||||
|
|
Loading…
Reference in New Issue