From cbb682e6b86e0b462cef73fdaad61e4be83b06b6 Mon Sep 17 00:00:00 2001
From: Matteo Varalta <matteo.varalta@txtgroup.com>
Date: 周二, 23 4月 2019 17:07:40 +0800
Subject: [PATCH] Porting to Centos 7: xfs file system, cmake 2.8.11 in example, static linking for -lgcc_s

---
 src/library/os/os-linux.c |    1 +
 example/CMakeLists.txt    |    3 ++-
 CMakeLists.txt            |    1 +
 3 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 49fcd95..36c3611 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -98,6 +98,7 @@
 	    list(APPEND EXTERNAL_LIBS ${DBUS_LIBRARIES})
 	endif(USE_DBUS_IDENTIFIER)    
 	list(APPEND EXTERNAL_LIBS dl)
+	list(APPEND EXTERNAL_LIBS "-Wl,-Bdynamic")
 endif(NOT MSVC)
 
 configure_file (
diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt
index e6b1ee1..425fb92 100644
--- a/example/CMakeLists.txt
+++ b/example/CMakeLists.txt
@@ -1,4 +1,5 @@
-cmake_minimum_required(VERSION 3.0)
+#cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 2.8.11)
 
 link_directories (   "${CMAKE_CURRENT_SOURCE_DIR}/../install/lib" )
 include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/../install/include" )
diff --git a/src/library/os/os-linux.c b/src/library/os/os-linux.c
index 717373a..050d5aa 100644
--- a/src/library/os/os-linux.c
+++ b/src/library/os/os-linux.c
@@ -93,6 +93,7 @@
 	currentDrive = 0;
 	while (NULL != (ent = getmntent(aFile))) {
 		if ((strncmp(ent->mnt_type, "ext", 3) == 0
+				|| strncmp(ent->mnt_type, "xfs", 3) == 0
 				|| strncmp(ent->mnt_type, "vfat", 4) == 0
 				|| strncmp(ent->mnt_type, "ntfs", 4) == 0)
 				&& ent->mnt_fsname != NULL

--
Gitblit v1.9.1