summaryrefslogtreecommitdiffstats
path: root/src/rccexternal.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2014-06-12 19:03:18 +0200
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2014-06-12 19:03:18 +0200
commitf5c9a8080f0932335457fe5cb0dff38c2d491cb5 (patch)
tree26ec33246b846a54a6a52747519ca80c3c1000b7 /src/rccexternal.c
parent89f93872d8e024c761cc55335518f7d48d414fdb (diff)
downloadlibrcc-f5c9a8080f0932335457fe5cb0dff38c2d491cb5.tar.gz
librcc-f5c9a8080f0932335457fe5cb0dff38c2d491cb5.tar.bz2
librcc-f5c9a8080f0932335457fe5cb0dff38c2d491cb5.tar.xz
librcc-f5c9a8080f0932335457fe5cb0dff38c2d491cb5.zip
Mingw compatibility fixes by trialuser
Diffstat (limited to 'src/rccexternal.c')
-rw-r--r--src/rccexternal.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rccexternal.c b/src/rccexternal.c
index eba1f71..1441f24 100644
--- a/src/rccexternal.c
+++ b/src/rccexternal.c
@@ -70,6 +70,7 @@ static char *addr = NULL;
#endif /* HAVE_UNISTD_H */
int rccExternalInit() {
+#ifndef _WIN32 // WNOHANG is not defined
#ifdef HAVE_UNISTD_H
# ifdef HAVE_SIGNAL_H
struct sigaction act;
@@ -111,10 +112,12 @@ int rccExternalInit() {
}
# endif /* HAVE_SYS_STAT_H */
#endif /* HAVE_UNISTD_H */
+#endif /* _WIN32 */
_exit(1);
}
void rccExternalFree() {
+#ifndef _WIN32 // WNOHANG is not defined
#ifdef HAVE_UNISTD_H
int retry;
pid_t res;
@@ -135,6 +138,7 @@ void rccExternalFree() {
pid = (pid_t)-1;
if (addr) free(addr);
#endif /* HAVE_UNISTD_H */
+#endif /* _WIN32 */
}
#ifdef HAVE_SYS_SELECT_H