diff options
author | Nick Kralevich <nnk@google.com> | 2012-03-01 17:07:00 -0800 |
---|---|---|
committer | Nick Kralevich <nnk@google.com> | 2012-03-01 17:07:00 -0800 |
commit | 44d845293deb303e44a27acbc173b39b6e104ade (patch) | |
tree | e8be0322bd4a7874eba83b2dee1fa9b2f1ccfd66 | |
parent | e5f6b61e77e2fccb3c5c14ca8d57a32959339cd0 (diff) | |
download | stingray-44d845293deb303e44a27acbc173b39b6e104ade.tar.gz |
remove HAL_MODULE_INFO_SYM const
HAL_MODULE_INFO_SYM was declared as read-only, but
the struct is written to by libhardware. This causes
a segfault when -Wl,-z,relro is enabled.
Fixed.
Change-Id: Ia0c92d57087914dc1e8a9e44677db1fa54026da9
-rwxr-xr-x | liblights/lights.c | 2 | ||||
-rw-r--r-- | sensors/sensors.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/liblights/lights.c b/liblights/lights.c index 3105024..9e72091 100755 --- a/liblights/lights.c +++ b/liblights/lights.c @@ -274,7 +274,7 @@ static struct hw_module_methods_t lights_module_methods = { /* * The lights Module */ -const struct hw_module_t HAL_MODULE_INFO_SYM = { +struct hw_module_t HAL_MODULE_INFO_SYM = { .tag = HARDWARE_MODULE_TAG, .version_major = 1, .version_minor = 0, diff --git a/sensors/sensors.c b/sensors/sensors.c index a60e165..a285a87 100644 --- a/sensors/sensors.c +++ b/sensors/sensors.c @@ -66,7 +66,7 @@ static struct hw_module_methods_t sensors_module_methods = { .open = open_sensors }; -const struct sensors_module_t HAL_MODULE_INFO_SYM = { +struct sensors_module_t HAL_MODULE_INFO_SYM = { .common = { .tag = HARDWARE_MODULE_TAG, .version_major = 1, |