mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 21:56:31 +00:00
lockdev: fix build with the musl C library
When the musl C library is used, the __GNU_LIBRARY__ symbol is not defined, so the lockdev code doesn't know what to do. To work around this, we explicitly pass __GNU_LIBRARY__ when building with musl, this musl provides what's needed for lockdev to build, as if we were building against glibc. Fixes: http://autobuild.buildroot.org/results/9db/9db4ab40955d3af0027e141245d73ee6c614fb1f/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
2badd96d9e
commit
c61e97a4d9
@ -24,6 +24,12 @@ LOCKDEV_BUILD_ARGS = shared
|
|||||||
LOCKDEV_INSTALL_ARGS = install_run
|
LOCKDEV_INSTALL_ARGS = install_run
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Make the code believe we are using a C library compatible with
|
||||||
|
# glibc, which for the purpose of lockdev is actually true.
|
||||||
|
ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
|
||||||
|
LOCKDEV_BUILD_ARGS += CFLAGS="$(TARGET_CFLAGS) -D__GNU_LIBRARY__"
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(BR2_SHARED_STATIC_LIBS)$(BR2_SHARED_LIBS),y)
|
ifeq ($(BR2_SHARED_STATIC_LIBS)$(BR2_SHARED_LIBS),y)
|
||||||
define LOCKDEV_CREATE_LINKS_STAGING
|
define LOCKDEV_CREATE_LINKS_STAGING
|
||||||
ln -sf liblockdev.$(LOCKDEV_VERSION).so $(STAGING_DIR)/usr/lib/liblockdev.so
|
ln -sf liblockdev.$(LOCKDEV_VERSION).so $(STAGING_DIR)/usr/lib/liblockdev.so
|
||||||
|
Loading…
x
Reference in New Issue
Block a user