summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mkspecs/unsupported/integrity-ghs/qplatformdefs.h4
-rw-r--r--src/corelib/io/qprocess_unix.cpp7
2 files changed, 4 insertions, 7 deletions
diff --git a/mkspecs/unsupported/integrity-ghs/qplatformdefs.h b/mkspecs/unsupported/integrity-ghs/qplatformdefs.h
index 87459d874e..4df7dea1d7 100644
--- a/mkspecs/unsupported/integrity-ghs/qplatformdefs.h
+++ b/mkspecs/unsupported/integrity-ghs/qplatformdefs.h
@@ -170,6 +170,10 @@
#define QT_VSNPRINTF ::vsnprintf
#endif
+// INTEGRITY doesn't enable the declaration in _POSIX_SOURCE mode,
+// because strdup() is not part of strict Posix; declare it here
+extern "C" char *strdup(const char *src);
+
#ifndef MAXNAMLEN
# define MAXNAMLEN NAME_MAX
#endif
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp
index fe13a9e06e..17dae7b6ca 100644
--- a/src/corelib/io/qprocess_unix.cpp
+++ b/src/corelib/io/qprocess_unix.cpp
@@ -117,13 +117,6 @@ QT_BEGIN_NAMESPACE
// so we will use 512
static const int errorBufferMax = 512;
-#ifdef Q_OS_INTEGRITY
-static inline char *strdup(const char *data)
-{
- return qstrdup(data);
-}
-#endif
-
static int qt_qprocess_deadChild_pipe[2];
static struct sigaction qt_sa_old_sigchld_handler;
static void qt_sa_sigchld_handler(int signum)