summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bsdiff.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/bsdiff.c b/bsdiff.c
index ceccb38..d52925d 100644
--- a/bsdiff.c
+++ b/bsdiff.c
@@ -29,8 +29,6 @@ __FBSDID("$FreeBSD: src/usr.bin/bsdiff/bsdiff/bsdiff.c,v 1.1 2005/08/06 01:59:05
#endif
#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
struct bsdiff_header
{
@@ -50,6 +48,11 @@ struct bsdiff_compressor
int (*finish)(struct bsdiff_compressor* compressor);
};
+#if !defined(BSDIFF_HEADER_ONLY)
+
+#include <stdlib.h>
+#include <string.h>
+
#define MIN(x,y) (((x)<(y)) ? (x) : (y))
static void split(int64_t *I,int64_t *V,int64_t start,int64_t len,int64_t h)
@@ -554,4 +557,6 @@ int main(int argc,char *argv[])
return 0;
}
-#endif
+#endif //BSDIFF_LIBRARY
+
+#endif // BSDIFF_HEADER_ONLY