فهرست منبع

jpeg-compressor: Fix include when compiling with Clang and `FORTIFY_SOURCE >= 1`

Stefan Cristian B. 7 ماه پیش
والد
کامیت
4462363e1e
2فایلهای تغییر یافته به همراه21 افزوده شده و 1 حذف شده
  1. 1 1
      thirdparty/jpeg-compressor/jpge.cpp
  2. 20 0
      thirdparty/jpeg-compressor/patches/clang-fortify-fix.patch

+ 1 - 1
thirdparty/jpeg-compressor/jpge.cpp

@@ -30,6 +30,7 @@
 
 
 #include "jpge.h"
 #include "jpge.h"
 
 
+#include <stdio.h>
 #include <stdlib.h>
 #include <stdlib.h>
 #include <string.h>
 #include <string.h>
 
 
@@ -933,7 +934,6 @@ namespace jpge {
 	}
 	}
 
 
 	// Higher level wrappers/examples (optional).
 	// Higher level wrappers/examples (optional).
-#include <stdio.h>
 
 
 	class cfile_stream : public output_stream
 	class cfile_stream : public output_stream
 	{
 	{

+ 20 - 0
thirdparty/jpeg-compressor/patches/clang-fortify-fix.patch

@@ -0,0 +1,20 @@
+diff --git a/thirdparty/jpeg-compressor/jpge.cpp b/thirdparty/jpeg-compressor/jpge.cpp
+index 5a36c19653..bb0c54bbf0 100644
+--- a/thirdparty/jpeg-compressor/jpge.cpp
++++ b/thirdparty/jpeg-compressor/jpge.cpp
+@@ -30,6 +30,7 @@
+ 
+ #include "jpge.h"
+ 
++#include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+ 
+@@ -933,7 +934,6 @@ namespace jpge {
+ 	}
+ 
+ 	// Higher level wrappers/examples (optional).
+-#include <stdio.h>
+ 
+ 	class cfile_stream : public output_stream
+ 	{