makefile: On Linux, avoid using shm_ APIs when librt isn't available
As reported in #780
This commit is contained in:
parent
1314f9edfa
commit
3ec9f44fbd
1 changed files with 7 additions and 2 deletions
9
makefile
9
makefile
|
@ -576,8 +576,13 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
|||
endif
|
||||
ifneq (,$(call find_include,sys/mman))
|
||||
ifneq (,$(shell grep shm_open $(call find_include,sys/mman)))
|
||||
OS_CCDEFS += -DHAVE_SHM_OPEN
|
||||
$(info using mman: $(call find_include,sys/mman))
|
||||
# some Linux installs have been known to have the include, but are
|
||||
# missing librt (where the shm_ APIs are implemented on Linux)
|
||||
# other OSes seem have these APIs implemented elsewhere
|
||||
ifneq (,$(if $(findstring Linux,$(OSTYPE)),$(call find_lib,rt),OK))
|
||||
OS_CCDEFS += -DHAVE_SHM_OPEN
|
||||
$(info using mman: $(call find_include,sys/mman))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifneq (,$(VIDEO_USEFUL))
|
||||
|
|
Loading…
Add table
Reference in a new issue