[tor-commits] [tor/maint-0.4.0] fdio.c: add more includes.

asn at torproject.org asn at torproject.org
Thu Apr 18 10:23:54 UTC 2019


commit 821d29e42040789c59d271ba2f1d87a54d6d1435
Author: Nick Mathewson <nickm at torproject.org>
Date:   Wed Apr 3 13:53:36 2019 -0400

    fdio.c: add more includes.
    
    This is just in case there is some rogue platform that uses a
    nonstandard value for SEEK_*, and does not define that macro in
    unistd.h.  I think that's unlikely, but it's conceivable.
---
 src/lib/fdio/fdio.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/lib/fdio/fdio.c b/src/lib/fdio/fdio.c
index 6c87af791..078af6a9b 100644
--- a/src/lib/fdio/fdio.c
+++ b/src/lib/fdio/fdio.c
@@ -17,12 +17,16 @@
 #ifdef _WIN32
 #include <windows.h>
 #endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
 
 #include "lib/fdio/fdio.h"
 #include "lib/cc/torint.h"
 #include "lib/err/torerr.h"
 
 #include <stdlib.h>
+#include <stdio.h>
 
 /** @{ */
 /** Some old versions of Unix didn't define constants for these values,





More information about the tor-commits mailing list