]> ruderich.org/simon Gitweb - coloredstderr/coloredstderr.git/blobdiff - src/coloredstderr.c
Only hook vfork() if it's available.
[coloredstderr/coloredstderr.git] / src / coloredstderr.c
index 9ade423a4ed99c78000ab2a22de623ab5476074b..c1522186592a91bbfece42a510c5e77018d9257b 100644 (file)
@@ -330,6 +330,7 @@ int fclose(FILE *fp) {
 
 /* Hook functions which are necessary for correct tracking. */
 
+#if defined(HAVE_VFORK) && defined(HAVE_FORK)
 pid_t vfork(void) {
     /* vfork() is similar to fork() but the address space is shared between
      * father and child. It's designed for fork()/exec() usage because it's
@@ -344,3 +345,4 @@ pid_t vfork(void) {
      * most systems use copy-on-write anyway not a performance issue. */
     return fork();
 }
+#endif