diff options
Diffstat (limited to 'libbb/xfuncs.c')
-rw-r--r-- | libbb/xfuncs.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c index 4bb05f248..e88a5380f 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c | |||
@@ -487,3 +487,13 @@ void xlisten(int s, int backlog) | |||
487 | if (listen(s, backlog)) bb_perror_msg_and_die("listen"); | 487 | if (listen(s, backlog)) bb_perror_msg_and_die("listen"); |
488 | } | 488 | } |
489 | #endif | 489 | #endif |
490 | |||
491 | #ifdef L_xstat | ||
492 | /* xstat() - a stat() which dies on failure with meaningful error message */ | ||
493 | void xstat(const char * const name, struct stat *stat_buf) | ||
494 | { | ||
495 | if (stat(name, stat_buf)) | ||
496 | bb_perror_msg_and_die("Can't stat '%s'", name); | ||
497 | } | ||
498 | #endif | ||
499 | |||