vcpkg/ports/hunspell/0001_fix_unistd.patch

43 lines
1.1 KiB
Diff
Raw Normal View History

2017-07-25 08:12:30 +08:00
diff --git a/src/tools/hzip.cxx b/src/tools/hzip.cxx
2023-03-30 07:43:44 +08:00
index d7d2d2464..30bb5a32c 100644
2017-07-25 08:12:30 +08:00
--- a/src/tools/hzip.cxx
+++ b/src/tools/hzip.cxx
2023-03-30 07:43:44 +08:00
@@ -38,10 +38,13 @@
/* hzip: file compression for sorted dictionaries with optional encryption,
* algorithm: prefix-suffix encoding and 16-bit Huffman encoding */
+#include <config.h>
2017-07-25 08:12:30 +08:00
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
#include <string>
#include <sys/stat.h>
2023-03-30 07:43:44 +08:00
diff --git a/src/tools/munch.cxx b/src/tools/munch.cxx
index e33ac71e3..1e8342ff5 100644
--- a/src/tools/munch.cxx
+++ b/src/tools/munch.cxx
@@ -40,7 +40,6 @@
2017-07-25 08:12:30 +08:00
#include <ctype.h>
#include <string.h>
#include <string>
2023-03-30 07:43:44 +08:00
-#include <unistd.h>
2017-07-25 08:12:30 +08:00
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
2023-03-30 07:43:44 +08:00
diff --git a/src/tools/unmunch.cxx b/src/tools/unmunch.cxx
index 5a73e6fe9..3d9e31832 100644
--- a/src/tools/unmunch.cxx
+++ b/src/tools/unmunch.cxx
@@ -42,7 +42,6 @@
2017-07-25 08:12:30 +08:00
#include <ctype.h>
#include <string.h>
#include <string>
2023-03-30 07:43:44 +08:00
-#include <unistd.h>
2017-07-25 08:12:30 +08:00
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>