Private
Public Access
2
0

maa_init: add GCC attribute to call init function as a constructor

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2014-05-13 20:44:34 +00:00
parent b00484b797
commit b8e0ca76b1

View File

@@ -40,6 +40,12 @@ maa_get_version()
return gVERSION;
}
#ifndef SWIG
// this sets a compiler attribute (supported by GCC & clang) to have maa_init()
// be called as a constructor make sure your libc supports this! uclibc needs
// to be compiled with UCLIBC_CTOR_DTOR
maa_result_t maa_init() __attribute__((constructor));
#endif
maa_result_t
maa_init()
{