Skip to content

Commit 870edbf

Browse files
committed
Added process.h include and check if available through cmake.
* process.h defines getpid on WIN32 systems.
1 parent 0f3b626 commit 870edbf

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ CHECK_INCLUDE_FILE(sysent.h HAVE_SYSENT_H)
209209
CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_H)
210210
CHECK_INCLUDE_FILE(dirent.h HAVE_DIRENT_H)
211211
CHECK_INCLUDE_FILE(stdbool.h HAVE_STDBOOL_H)
212+
CHECK_INCLUDE_FILE(process.h HAVE_PROCESS_H)
212213

213214
CHECK_FUNCTION_EXISTS(abs HAVE_ABS)
214215
CHECK_FUNCTION_EXISTS(memcpy HAVE_MEMCPY)

include/scl_cf_cmake.h.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#cmakedefine HAVE_UNISTD_H 1
1111
#cmakedefine HAVE_DIRENT_H 1
1212
#cmakedefine HAVE_STDBOOL_H 1
13+
#cmakedefine HAVE_PROCESS_H 1
1314

1415
#cmakedefine HAVE_ABS 1
1516
#cmakedefine HAVE_MEMCPY 1

src/express/fedex.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@
7979
#ifdef HAVE_UNISTD_H
8080
# include <unistd.h>
8181
#endif
82+
#ifdef HAVE_PROCESS_H
83+
/* process.h defines getpid() function on WIN32 systems */
84+
# include <process.h>
85+
#endif
8286
#ifndef HAVE_GETOPT
8387
# include "xgetopt.h"
8488
#endif

0 commit comments

Comments
 (0)