All pastes #398599 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-03-17 11:39 UTC
rendered paste body
#include <sys/types.h>
#include <dirent.h>

int
dirfd (DIR* dir)
{   
    if (dir == NULL)
        return -1;

#if !defined(__XOPEN_OR_POSIX)
    return dir->dd_fd;
#else
    return dir->d_fd;
#endif
}