$NetBSD$
SHA1 (patch-src_gc_gc.cpp) = c468a34bbafe35dcd242065762ff042a94152e47
+SHA1 (patch-src_pal_src_misc_miscpalapi.cpp) = b7a902309081c9a1a4d7a8a4dcfbb11342c7e311
SHA1 (patch-src_vm_amd64_externalmethodfixupthunk.S) = 5e84b369f30ea62e391e1f949d0d01e1995e5192
SHA1 (patch-src_vm_amd64_jithelpers__fast.S) = b4002abaed826b673c0af58a818c25d6b17e488e
SHA1 (patch-src_vm_amd64_pinvokestubs.S) = 344e94f87fc08edde9a61f74a495e3bd2ed11248
--- /dev/null
+$NetBSD$
+
+--- src/pal/src/misc/miscpalapi.cpp.orig 2016-01-28 19:04:13.000000000 +0000
++++ src/pal/src/misc/miscpalapi.cpp
+@@ -33,10 +33,10 @@ Revision History:
+ #include <pthread.h>
+ #include <dlfcn.h>
+
+-#if HAVE_LIBUUID_H
+-#include <uuid/uuid.h>
+-#elif HAVE_BSD_UUID_H
++#if HAVE_BSD_UUID_H
+ #include <uuid.h>
++#elif HAVE_LIBUUID_H
++#include <uuid/uuid.h>
+ #endif
+
+ #include <pal_endian.h>
+@@ -352,15 +352,7 @@ HRESULT
+ PALAPI
+ CoCreateGuid(OUT GUID * pguid)
+ {
+-#if HAVE_LIBUUID_H
+- uuid_generate_random(*(uuid_t*)pguid);
+-
+- // Change the byte order of the Data1, 2 and 3, since the uuid_generate_random
+- // generates them with big endian while GUIDS need to have them in little endian.
+- pguid->Data1 = SWAP32(pguid->Data1);
+- pguid->Data2 = SWAP16(pguid->Data2);
+- pguid->Data3 = SWAP16(pguid->Data3);
+-#elif HAVE_BSD_UUID_H
++#if HAVE_BSD_UUID_H
+ uuid_t uuid;
+ uint32_t status;
+ uuid_create(&uuid, &status);
+@@ -372,6 +364,14 @@ CoCreateGuid(OUT GUID * pguid)
+
+ // Encode the uuid with little endian.
+ uuid_enc_le(pguid, &uuid);
++#elif HAVE_LIBUUID_H
++ uuid_generate_random(*(uuid_t*)pguid);
++
++ // Change the byte order of the Data1, 2 and 3, since the uuid_generate_random
++ // generates them with big endian while GUIDS need to have them in little endian.
++ pguid->Data1 = SWAP32(pguid->Data1);
++ pguid->Data2 = SWAP16(pguid->Data2);
++ pguid->Data3 = SWAP16(pguid->Data3);
+ #else
+ #error Don't know how to generate UUID on this platform
+ #endif