-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed build on Fedora 28+(tested on 34) by integration libtirpc as replacement for SunRPC from libc fixed memory overrun in Watch analyzer for NFS40 and NFS41 removed -Wno-error=address-of-packed-member compiler flag removed packed attribute from Session::IPAddress.v6 union
- Loading branch information
1 parent
b220d04
commit 849a019
Showing
5 changed files
with
29 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
cmake_minimum_required (VERSION 3.0) | ||
project (nfstrace) | ||
project (nfstrace LANGUAGES CXX) | ||
|
||
set(CMAKE_CXX_STANDARD 14) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
# check compiler and packages ================================================== | ||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") | ||
|
@@ -25,12 +28,26 @@ find_library(PCAP_LIBRARY | |
NAMES pcap | ||
HINTS ${PCAP_ROOT_DIR}/lib) | ||
|
||
if ("${PCAP_LIBRARY}" STREQUAL "PCAP_LIBRARY-NOTFOUND") | ||
if (NOT PCAP_LIBRARY) | ||
message (FATAL_ERROR "Could NOT find PCAP") | ||
endif () | ||
|
||
# See: https://fedoraproject.org/wiki/Changes/SunRPCRemoval | ||
find_file (FEDORA_FOUND fedora-release PATHS /etc) | ||
find_file (REDHAT_FOUND redhat-release PATHS /etc) | ||
if (FEDORA_FOUND OR REDHAT_FOUND) | ||
find_library (TIRPC_LIBRARY NAMES tirpc) | ||
find_path (TIRPC_INCLUDE NAMES rpc/rpc.h PATHS /usr/include/tirpc) | ||
if (TIRPC_LIBRARY AND TIRPC_INCLUDE) | ||
include_directories (${TIRPC_INCLUDE}) | ||
link_libraries (${TIRPC_LIBRARY}) | ||
else () | ||
message (FATAL_ERROR "${TIRPC_LIBRARY} ${TIRPC_INCLUDE} is required for Fedora/RedHat") | ||
endif () | ||
endif () | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
andrewshadura
Contributor
|
||
|
||
# build application ============================================================ | ||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -pedantic -Wall -Werror -Wextra -Wno-invalid-offsetof -Wno-error=address-of-packed-member -fPIC -fvisibility=hidden") | ||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Werror -Wextra -Wno-invalid-offsetof -fPIC -fvisibility=hidden") | ||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--export-dynamic") | ||
|
||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND "${INCLUDE_COVERAGE_INFO}") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Well, this is wrong, tirpc is required everywhere, not just on Fedora.