#include "pax.h"
#include "tables.h"
#include "extern.h"
-#include "features.h"
+#include <unistd.h>
/*
* Routines for controlling the contents of all the different databases pax
add_dir(char *name, struct stat *psb, int frc_mode)
{
DIRDATA *dblk;
-#if (_POSIX_C_SOURCE - 0) >= 200809L
+#if (_POSIX_VERSION >= 200809L)
char *rp = NULL;
#else
char realname[MAXPATHLEN], *rp;
return;
if (havechd && *name != '/') {
-#if (_POSIX_C_SOURCE - 0) >= 200809L
+#if (_POSIX_VERSION >= 200809L)
if ((rp = realpath(name, NULL)) == NULL) {
#else
if ((rp = realpath(name, realname)) == NULL) {
if (dblk == NULL) {
paxwarn(1, "Unable to store mode and times for created"
" directory: %s", name);
-#if (_POSIX_C_SOURCE - 0) >= 200809L
+#if (_POSIX_VERSION >= 200809L)
free(rp);
#endif
return;
if ((dblk->name = strdup(name)) == NULL) {
paxwarn(1, "Unable to store mode and times for created"
" directory: %s", name);
-#if (_POSIX_C_SOURCE - 0) >= 200809L
+#if (_POSIX_VERSION >= 200809L)
free(rp);
#endif
return;
dblk->atime = psb->st_atime;
dblk->frc_mode = frc_mode;
++dircnt;
-#if (_POSIX_C_SOURCE - 0) >= 200809L
+#if (_POSIX_VERSION >= 200809L)
free(rp);
#endif
}