I haven't been able to figure this one out. I think the compiler is not defining _MSC_VER so that io.h is not included, but I don't want to remove the check for it at the risk of breaking other builds that servo supports. Trying to use _dup also produces an implicit declaration message.
C:\projects\heartbeats-simple\src\hb.c:105:3: warning: implicit declaration of function 'dup' [-Wimplicit-function-declaration]
FILE* log = fdopen(dup(fd), "w");
^
Perhaps there is a better way to get a FILE* from a file descriptor that we can properly cleanup without closing the underlying fd when we're finished that doesn't use dup.
I haven't been able to figure this one out. I think the compiler is not defining _MSC_VER so that io.h is not included, but I don't want to remove the check for it at the risk of breaking other builds that servo supports. Trying to use
_dupalso produces an implicit declaration message.Perhaps there is a better way to get a
FILE*from a file descriptor that we can properly cleanup without closing the underlying fd when we're finished that doesn't usedup.