Commit Diff


commit - d3f1e38b5d5c7188a56b8b08d472ff8683c10e15
commit + 68069cf6014c5bd18aba4f3fa754c793c6740b3d
blob - 7824fa9a867cfb43694e08cb4617069d28d9e5ca
blob + 356d4183db0c1a3595729548617393b185bfed4e
--- include/got_compat2.h
+++ include/got_compat2.h
@@ -212,6 +212,9 @@ typedef struct _SHA2_CTX {
 	u_int64_t	bitcount[2];
 	u_int8_t	buffer[SHA512_BLOCK_LENGTH];
 } SHA2_CTX;
+#endif
+
+#if defined(__APPLE__) || defined(__NetBSD__)
 #define SHA256Init SHA256_Init
 #define SHA256Update SHA256_Update
 #define SHA256Final SHA256_Final
blob - 3235b8c431f5d9fe37b29f4e87c953e2c0b1b380
blob + 89562361089d480759e5366d089156845be28b49
--- lib/deflate.c
+++ lib/deflate.c
@@ -14,6 +14,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include "got_compat.h"
+
 #include <sys/queue.h>
 
 #include <errno.h>
@@ -23,7 +25,6 @@
 #include <zlib.h>
 #include <time.h>
 
-#include "got_compat.h"
 #include "got_error.h"
 #include "got_object.h"
 #include "got_path.h"
blob - c886d1a285863fa2148b2b295b733d08fe7c9040
blob + 37b7f2b63c9f5a8e3a7ccee3cd4d60d698ef7c22
--- lib/diff_myers.c
+++ lib/diff_myers.c
@@ -16,6 +16,8 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
+
+#include "got_compat.h"
 
 #include <stdbool.h>
 #include <stdint.h>
blob - f024469b941b3c0d551b8050cdb33fe296707d8f
blob + 428751fa19345e93f294c2c9ee5ecf5052092a35
--- lib/diffreg.c
+++ lib/diffreg.c
@@ -14,6 +14,8 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
+
+#include "got_compat.h"
 
 #include <sys/mman.h>
 #include <sys/stat.h>
@@ -23,8 +25,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-
-#include "got_compat.h"
 
 #include "got_object.h"
 #include "got_opentemp.h"
blob - 714ead9c490fd270970c36841073e3b242f0a005
blob + 72130751b2d228dbd5ee224857661dc3217d263f
--- lib/hash.c
+++ lib/hash.c
@@ -14,6 +14,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include "got_compat.h"
+
 #include <sys/types.h>
 #include <sys/queue.h>
 
@@ -23,8 +25,6 @@
 #include <string.h>
 #include <limits.h>
 
-#include "got_compat.h"
-
 #include "got_object.h"
 
 #include "got_lib_hash.h"
blob - 3dff610bd701189b93bfd4157175df7ada64b2fb
blob + a59c766edfa1a6912c2c7c02cc0d66b896bba049
--- lib/inflate.c
+++ lib/inflate.c
@@ -14,6 +14,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include "got_compat.h"
+
 #include <sys/queue.h>
 
 #include <errno.h>
@@ -25,7 +27,6 @@
 #include <zlib.h>
 #include <time.h>
 
-#include "got_compat.h"
 #include "got_error.h"
 #include "got_object.h"
 #include "got_path.h"