--- rzip-2.0/configure.in.orig 2005-09-17 17:10:08.000000000 +0200 +++ rzip-2.0/configure.in 2005-09-17 17:10:21.000000000 +0200 @@ -52,5 +52,6 @@ AC_CHECK_FUNCS(mmap strerror) AC_CHECK_FUNCS(getopt_long) +AC_CHECK_FUNCS(strndup) AC_OUTPUT(Makefile) --- rzip-2.0/main.c.orig 2005-09-17 13:54:34.000000000 +0200 +++ rzip-2.0/main.c 2005-09-17 14:02:35.000000000 +0200 @@ -118,7 +118,14 @@ fchown(fd_out, st.st_uid, st.st_gid); } - +#ifndef HAVE_STRNDUP +static char* strndup(const char* s, size_t n) { + char* ret = malloc(n + 1); + if (ret == NULL) return(ret); + ret[n] = '\0'; + return(strncpy(ret, s, n)); +} +#endif /* decompress one file from the command line