mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-03 02:10:04 +00:00
libsdl-image: Fix build with clang16
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
+52
@@ -0,0 +1,52 @@
|
||||
From 41791738221fdb7574fc8e23f84214910cdce098 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 1 Mar 2023 21:51:40 -0800
|
||||
Subject: [PATCH] png-img: Fix prototypes of callbacks
|
||||
|
||||
Clang-16 is flagging function pointer mismatches
|
||||
|
||||
Upstream-Status: Inappropriate [No upstream]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
IMG_png.c | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/IMG_png.c b/IMG_png.c
|
||||
index 5f91f15..4d5bdb6 100644
|
||||
--- a/IMG_png.c
|
||||
+++ b/IMG_png.c
|
||||
@@ -78,15 +78,15 @@
|
||||
static struct {
|
||||
int loaded;
|
||||
void *handle;
|
||||
- png_infop (*png_create_info_struct) (png_structp png_ptr);
|
||||
+ png_infop (*png_create_info_struct) (png_const_structp png_ptr);
|
||||
png_structp (*png_create_read_struct) (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn);
|
||||
void (*png_destroy_read_struct) (png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr);
|
||||
- png_uint_32 (*png_get_IHDR) (png_structp png_ptr, png_infop info_ptr, png_uint_32 *width, png_uint_32 *height, int *bit_depth, int *color_type, int *interlace_method, int *compression_method, int *filter_method);
|
||||
- png_voidp (*png_get_io_ptr) (png_structp png_ptr);
|
||||
- png_byte (*png_get_channels) (png_structp png_ptr, png_infop info_ptr);
|
||||
- png_uint_32 (*png_get_PLTE) (png_structp png_ptr, png_infop info_ptr, png_colorp *palette, int *num_palette);
|
||||
- png_uint_32 (*png_get_tRNS) (png_structp png_ptr, png_infop info_ptr, png_bytep *trans, int *num_trans, png_color_16p *trans_values);
|
||||
- png_uint_32 (*png_get_valid) (png_structp png_ptr, png_infop info_ptr, png_uint_32 flag);
|
||||
+ png_uint_32 (*png_get_IHDR) (png_const_structp png_ptr, png_const_infop info_ptr, png_uint_32 *width, png_uint_32 *height, int *bit_depth, int *color_type, int *interlace_method, int *compression_method, int *filter_method);
|
||||
+ png_voidp (*png_get_io_ptr) (png_const_structp png_ptr);
|
||||
+ png_byte (*png_get_channels) (png_const_structp png_ptr, png_const_infop info_ptr);
|
||||
+ png_uint_32 (*png_get_PLTE) (png_const_structp png_ptr, png_infop info_ptr, png_colorp *palette, int *num_palette);
|
||||
+ png_uint_32 (*png_get_tRNS) (png_const_structp png_ptr, png_infop info_ptr, png_bytep *trans, int *num_trans, png_color_16p *trans_values);
|
||||
+ png_uint_32 (*png_get_valid) (png_const_structp png_ptr, png_const_infop info_ptr, png_uint_32 flag);
|
||||
void (*png_read_image) (png_structp png_ptr, png_bytepp image);
|
||||
void (*png_read_info) (png_structp png_ptr, png_infop info_ptr);
|
||||
void (*png_read_update_info) (png_structp png_ptr, png_infop info_ptr);
|
||||
@@ -95,7 +95,7 @@ static struct {
|
||||
void (*png_set_packing) (png_structp png_ptr);
|
||||
void (*png_set_read_fn) (png_structp png_ptr, png_voidp io_ptr, png_rw_ptr read_data_fn);
|
||||
void (*png_set_strip_16) (png_structp png_ptr);
|
||||
- int (*png_sig_cmp) (png_bytep sig, png_size_t start, png_size_t num_to_check);
|
||||
+ int (*png_sig_cmp) (png_const_bytep sig, png_size_t start, png_size_t num_to_check);
|
||||
#ifndef LIBPNG_VERSION_12
|
||||
jmp_buf* (*png_set_longjmp_fn) (png_structp, png_longjmp_ptr, size_t);
|
||||
#endif
|
||||
--
|
||||
2.39.2
|
||||
|
||||
@@ -7,8 +7,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=613734b7586e1580ef944961c6d62227"
|
||||
DEPENDS = "tiff zlib libpng jpeg libsdl"
|
||||
|
||||
SRC_URI = "http://www.libsdl.org/projects/SDL_image/release/SDL_image-${PV}.tar.gz \
|
||||
file://0001-png-img-Fix-prototypes-of-callbacks.patch \
|
||||
file://configure.patch"
|
||||
SRC_URI[md5sum] = "a0f9098ebe5400f0bdc9b62e60797ecb"
|
||||
SRC_URI[sha256sum] = "0b90722984561004de84847744d566809dbb9daf732a9e503b91a1b5a84e5699"
|
||||
|
||||
S = "${WORKDIR}/SDL_image-${PV}"
|
||||
|
||||
Reference in New Issue
Block a user