Fix build failure on macOS
[deliverable/binutils-gdb.git] / ld / ldbuildid.c
index d2dccc5c30be159579bc44cc9d1b8f2c6d72d771..c4ad19992b51161bb42049a20fd92766ce79d426 100644 (file)
@@ -1,5 +1,5 @@
 /* ldbuildid.c - Build Id support routines
-   Copyright (C) 2013-2016 Free Software Foundation, Inc.
+   Copyright (C) 2013-2019 Free Software Foundation, Inc.
 
    This file is part of the GNU Binutils.
 
@@ -139,7 +139,7 @@ generate_build_id (bfd *abfd,
 
       if (!rpc_library)
        return FALSE;
-      uuid_create = (UuidCreateFn) GetProcAddress (rpc_library, "UuidCreate");
+      uuid_create = (UuidCreateFn) (void (WINAPI *)(void)) GetProcAddress (rpc_library, "UuidCreate");
       if (!uuid_create)
        {
          FreeLibrary (rpc_library);
@@ -152,7 +152,8 @@ generate_build_id (bfd *abfd,
          return FALSE;
        }
       FreeLibrary (rpc_library);
-      memcpy (id_bits, &uuid, size < sizeof (UUID) ? size : sizeof (UUID));
+      memcpy (id_bits, &uuid,
+             (size_t) size < sizeof (UUID) ? (size_t) size : sizeof (UUID));
 #endif /* __MINGW32__ */
     }
   else if (strneq (style, "0x", 2))
This page took 0.025611 seconds and 4 git commands to generate.