Merge pull request #2183 from MilhouseVH/le90_giflib

giflib: don't export reallocarray function
This commit is contained in:
Radostan Riedel 2017-11-11 14:50:46 +01:00 committed by GitHub
commit 653f4c3fa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,34 @@
--- a/lib/dgif_lib.c
+++ b/lib/dgif_lib.c
@@ -23,6 +23,8 @@
#include "gif_lib.h"
#include "gif_lib_private.h"
+extern void *reallocarray(void *optr, size_t nmemb, size_t size);
+
/* compose unsigned little endian value */
#define UNSIGNED_LITTLE_ENDIAN(lo, hi) ((lo) | ((hi) << 8))
--- a/lib/gif_lib.h
+++ b/lib/gif_lib.h
@@ -244,9 +244,6 @@
GifPixelType ColorTransIn2[]);
extern int GifBitSize(int n);
-extern void *
-reallocarray(void *optr, size_t nmemb, size_t size);
-
/******************************************************************************
Support for the in-core structures allocation (slurp mode).
******************************************************************************/
--- a/lib/gifalloc.c
+++ b/lib/gifalloc.c
@@ -10,6 +10,8 @@
#include "gif_lib.h"
+extern void *reallocarray(void *optr, size_t nmemb, size_t size);
+
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
/******************************************************************************