diff options
author | Peter Simons <simons@cryp.to> | 2010-06-24T17·51+0000 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2010-06-24T17·51+0000 |
commit | af09fe12ddf356d93855cfe7b84d607e3103103a (patch) | |
tree | e438fd12e50929f00309493355531239090f10c4 /src/bsdiff-4.3/compat-include/err.h | |
parent | d63375d52998e91c4d79563727baa29eb0753251 (diff) |
Fix build of bsdiff-4.3 on machines that don't have <err.h>, such as Solaris.
Diffstat (limited to 'src/bsdiff-4.3/compat-include/err.h')
-rw-r--r-- | src/bsdiff-4.3/compat-include/err.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/bsdiff-4.3/compat-include/err.h b/src/bsdiff-4.3/compat-include/err.h new file mode 100644 index 000000000000..a851ded6f907 --- /dev/null +++ b/src/bsdiff-4.3/compat-include/err.h @@ -0,0 +1,12 @@ +/* Simulate BSD's <err.h> functionality. */ + +#ifndef COMPAT_ERR_H_INCLUDED +#define COMPAT_ERR_H_INCLUDED 1 + +#include <stdio.h> +#include <stdlib.h> + +#define err(rc,...) do { fprintf(stderr,__VA_ARGS__); exit(rc); } while(0) +#define errx(rc,...) do { fprintf(stderr,__VA_ARGS__); exit(rc); } while(0) + +#endif |