diff options
Diffstat (limited to 'lib/openat-die.c')
-rw-r--r-- | lib/openat-die.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/openat-die.c b/lib/openat-die.c index 0db20b9cd0..b10e627c6d 100644 --- a/lib/openat-die.c +++ b/lib/openat-die.c @@ -21,7 +21,10 @@ #include <stdlib.h> +#ifndef GNULIB_LIBPOSIX #include "error.h" +#endif + #include "exitfail.h" #include "gettext.h" @@ -30,9 +33,10 @@ void openat_save_fail (int errnum) { +#ifndef GNULIB_LIBPOSIX error (exit_failure, errnum, _("unable to record current working directory")); - +#endif /* The `noreturn' attribute cannot be applied to error, since it returns when its first argument is 0. To help compilers understand that this function does not return, call abort. Also, the abort is a @@ -48,8 +52,10 @@ openat_save_fail (int errnum) void openat_restore_fail (int errnum) { +#ifndef GNULIB_LIBPOSIX error (exit_failure, errnum, _("failed to return to initial working directory")); +#endif /* As above. */ abort (); |