--- a/src/internfile/internfile.cpp
+++ b/src/internfile/internfile.cpp
@@ -19,11 +19,11 @@
#include "autoconfig.h"
#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
+#include <errno.h>
+#include "safefcntl.h"
#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
+#include "safesysstat.h"
+#include "safeunistd.h"
#include <string>
#include <iostream>
@@ -1117,7 +1117,7 @@
#include <stdlib.h>
#include <iostream>
#include <string>
-#include <sys/stat.h>
+#include "safesysstat.h"
using namespace std;