|
From: <fli...@li...> - 2026-07-28 07:16:42
|
unknown user pushed a commit to branch next
in repository flightgear.
The following commit(s) were added to refs/heads/next by this push:
new 0b5fab77a Add missing POSIX includes for macOS
0b5fab77a is described below
SF URL: http://sourceforge.net/p/flightgear/flightgear/ci/0b5fab77a18ba12e2a41bd06431a3dc268b4c2fa/
Commit: 0b5fab77a18ba12e2a41bd06431a3dc268b4c2fa
Author: James Turner
Committer: James Turner
AuthorDate: Mon Jul 27 15:25:55 2026 +0100
Add missing POSIX includes for macOS
---
CMakeLists.txt | 2 +-
src/Network/ATC-Main.cxx | 13 +++++++------
src/Viewer/fg_os_osgviewer.cxx | 2 ++
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1ee493db9..a521a9256 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -53,7 +53,7 @@ endif()
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
-set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version")
+set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0" CACHE STRING "Minimum OS X deployment version")
project(FlightGear)
diff --git a/src/Network/ATC-Main.cxx b/src/Network/ATC-Main.cxx
index 6bfbe7f8b..9143ff49d 100644
--- a/src/Network/ATC-Main.cxx
+++ b/src/Network/ATC-Main.cxx
@@ -9,15 +9,16 @@
#include <simgear/compiler.h>
-#include <stdlib.h> // atoi() atof() abs()
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
#include <errno.h>
-
-#include <stdio.h> //snprintf
+#include <fcntl.h>
+#include <stdio.h> //snprintf
+#include <stdlib.h> // atoi() atof() abs()
+#include <sys/stat.h>
+#include <sys/types.h>
#ifdef _WIN32
# include <io.h> //lseek, read, write
+#else
+ #include <unistd.h> //lseek, read, write
#endif
#include <string>
diff --git a/src/Viewer/fg_os_osgviewer.cxx b/src/Viewer/fg_os_osgviewer.cxx
index 35caf65b7..2129d7ade 100755
--- a/src/Viewer/fg_os_osgviewer.cxx
+++ b/src/Viewer/fg_os_osgviewer.cxx
@@ -53,6 +53,8 @@
#if defined(SG_WINDOWS)
#include <process.h> // _getpid()
+#else
+ #include <unistd.h>
#endif
using namespace std;
|