summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
author杨威 <[email protected]>2023-04-27 11:07:07 +0800
committer杨威 <[email protected]>2023-05-04 17:44:49 +0800
commit219b474fd4ea5939c56c90086d03ece28acd21dd (patch)
tree903f2f9451760b6b9805481c1ac089a94ca7a7f1 /src/common
parentd5889c4b1fbebb15c4a3998e87b532694d850d22 (diff)
🔧 build(cmakelist): 更新cmake版本要求,移除_BSD_SOURCE宏
Diffstat (limited to 'src/common')
-rw-r--r--src/common/CMakeLists.txt4
-rw-r--r--src/common/Makefile2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 204d218..a025778 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8...3.10)
include_directories(${CMAKE_SOURCE_DIR}/include)
include_directories(${CMAKE_SOURCE_DIR}/include/private)
@@ -12,7 +12,7 @@ if(CAPTURE_MODE MATCHES "MARSIO")
include_directories(${MARSIO_SDK_PREFIX}/include)
endif()
-add_definitions(-D_BSD_SOURCE -D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H)
+add_definitions(-D_DEFAULT_SOURCE -D_DEFAULT_SOURCE -D__DEFAULT_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H)
add_definitions(-DPLATFORM_NSDPF_PAPP=1)
add_definitions(-fPIC)
diff --git a/src/common/Makefile b/src/common/Makefile
index 80f013c..df11f31 100644
--- a/src/common/Makefile
+++ b/src/common/Makefile
@@ -4,7 +4,7 @@
CC = g++
CCC = g++
CFLAGS += -Wall
-CFLAGS += -fPIC -shared -D_BSD_SOURCE -D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H
+CFLAGS += -fPIC -shared -D_DEFAULT_SOURCE -D_DEFAULT_SOURCE -D__DEFAULT_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H
CFLAGS += $(OPTFLAGS)
CFLAGS += $(PACKET_TAG_863)
CFLAGS += -DPLATFORM_NSDPF_PAPP=1