#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
#include "e2fsck.h"
#include <pwd.h>
strcpy(buf, "tytso");
break;
#else
+#ifdef HAVE_GETPWUID_R
getpwuid_r(getuid(), &pw_struct, buf, sizeof(buf), &pw);
+#else
+ pw = getpwuid(getuid());
+#endif
if (pw)
append_string(s, pw->pw_name, 0);
return;