From patchwork Mon Apr 6 13:41:06 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 4520 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id D81363F10C for ; Mon, 6 Apr 2026 15:41:14 +0200 (CEST) Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-43cfedb10a8sf2624465f8f.1 for ; Mon, 06 Apr 2026 06:41:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1775482874; cv=pass; d=google.com; s=arc-20240605; b=KZ0hPJ4LW/7sOjYNboCx4C4FOe+3oO4PgfkHhhAdO4JuaQ4BxsnzaJY1KLnPxEoifC 1yWByBRtbp9aqFJi1nuETKF0H1SXmelN0pdpIyTbZOx9SiM/EXQXsVxnenVeVkltV7jM LiCRqhWxdB8DQP2SeQEqvW7bVvr54EIQH38AnRdeUHVRpYvIWvX8d/In3uEOHQg+pjda jNia2OAOBgdpsAE0BquPWbRP7fIkZqMU9HDN+PlRoGOom8MMzQq5y4lqNkJWcHD4fT7b x/mqWNaOBYpgsnJrB3Z0rvI0DEU7EvBP+M6K+6K1Ckft7DCe3qulmGTT1phs37rcs4Sv hSxA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=0NXPnFJJWilmYeWfw0iJ82EmXiYIOI90Vy/RZ2/U/iI=; fh=MEoPU5NwvaacJqy+Bo/wR9NIedlTWNmPE1zo3ZXgKRc=; b=eBBUvrDSQcAKMb7EZBgY5nQWgtr6SA0oiw3+FF07ySbvglG8Di+PplKiLM/KBYcqYQ UYi2o6SxfNvpOtocSxin5J0LK+yu0yijlDYImZDHecNXt1v29ZWUkDVxtcwcm1oTck9p OlECt17BZG8Urp2wGQ+8Sa6spDAt7a0gU7fOWo5b/2O2PJKXTQSJD6sFd6yKKntsWcVw F7AtEtxlFyPAyVa28DinTyBS46jReHfLyt4oLKibMCmK34RotNutNCRQEwRC1P6J6zkK hGh9/MPrtxPA4ohn8fZh9zKoCNsI/92qn4lismedsv9ZSj77Uqy7+ZRLrrCwJQA9Oh9N rK1g==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jQD4aL90; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1775482874; x=1776087674; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :from:to:cc:subject:date:message-id:reply-to; bh=0NXPnFJJWilmYeWfw0iJ82EmXiYIOI90Vy/RZ2/U/iI=; b=iMBX8S8CW7xWmkifyiOaxhZrBrlwgkQNJq1tjjthS0xbrhCtlK7lZl0+k8phrFCwNZ 6/lFx6T8AQq+ooseVQIcNktgzKVggPcwTIEfPXBJSAopVqL6zSNn5JEKdtxCsTmWt33j NqqYz9UqrwxP4/PxtWKvAkQL5p4y5DIoKsXSY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775482874; x=1776087674; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-gm-gg:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0NXPnFJJWilmYeWfw0iJ82EmXiYIOI90Vy/RZ2/U/iI=; b=a1DzOPbHxFwW4PXmEN1bo0iqNL0Y4PVICjIroQQv24vSFEvRlVMxe0sC4xtiGqOL0h IsOH+bKjhJFfz9f9uGq9cEnnw27zv9+ftGv/R9flD6rhbu1MBi7RP2vz4g9h0T/IKeBp eqaCHIYy3p7z9pe3PxMf7f8kiVoyKqffyLwlr2h6uIXs5ya8Yil9Fdq5KMaPWasIN3PE 8INZNqBdJDRhidfi2M/0DEUAObjpb2dfPt/38EiBK8fCo5lGAfixeZvgkfZzH6gmR+/X 7UjacTk/wPTaJXQEs/fWW7uFc4rt33R6nRlL84ZGKXGJH1NRKPVI0ivOCE6wIXQZBfzT iM1w== X-Forwarded-Encrypted: i=2; AJvYcCU4HSZfPkGfO5HKDSViYE+kRpiq6OK3jaLS6J+OW0y0Pm5IMZIu2j4QhMKcvZFF33fdlYBHHNJ9zzCgfaeg@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YwfnOi+XPMiKDdPsFvKK2JUy22p/CkyKcWGNMXswgIOcX3GCE0i UnHBu41cDDFdvA94IKXd23f+7HJxl7M4hZieK3yttG1T4j+HwkeuPZ8IRlTqNWNmvIZzLg== X-Received: by 2002:a05:600c:1396:b0:486:fb0b:ad79 with SMTP id 5b1f17b1804b1-488997d10ffmr187765475e9.20.1775482874027; Mon, 06 Apr 2026 06:41:14 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com; h="AYAyTiIoiInIGfUXfYCBqBNDAJqlP+l4hQiCHr+TXHcOxb6gaA==" Received: by 2002:a05:600c:894:b0:488:ab54:fbf8 with SMTP id 5b1f17b1804b1-488ab54ff5dls5311075e9.0.-pod-prod-01-eu; Mon, 06 Apr 2026 06:41:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVDTvFes0TPpdT/OMBrFUTiWrRBLSB3r3qElvLuBad0g1sJzEPeR5rbBoKK/M1S73h93Z7Jq7ENZW0lLd3c@amarulasolutions.com X-Received: by 2002:a05:600c:630a:b0:485:2fe9:336f with SMTP id 5b1f17b1804b1-488998e3cbemr188958725e9.30.1775482872171; Mon, 06 Apr 2026 06:41:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775482872; cv=none; d=google.com; s=arc-20240605; b=Bn6gIDogKRuSrQy3SiUu+Lx5eoPJbrr0O6jO9qOJhDStK3aDc0N8WMUfmQjwClDEAy bDa1nWyfL8eO9qhPH6OVIbNNqNYuXkEumfzLpZrnlQ3++p5Dch/S6K1SPJ+iL1Sf89n+ BDgO9/nrisCEZW9376KH/CQQQ+ioDj5DSC8+lQFGYvWuCsPFNn9p5Z45tSmMVgM4uEYD yAP0SEUBirPz2kyp8UoNCho+7iFCydbeqAxH+rDWUu4LF9WNzppsdcoMSeebnvMs9SZH gKseia3Xh/yiLj858qdsG9UqyqibCc2p1EmmeJZI7Qw1HxOXUSAeTPLYjPzEFeIS0Rjx i1Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=cp1t8oM6TUHMTqy1Jerb2+ittTXrUcgT4OyBZ9si1oE=; fh=Op49Ott8/kQson6Uj4opF5GssjTEqBFJBP9MwU7IA/g=; b=lF6HhmhUaI8LIdvbiFE9uSqB/kjTj1YEa75fH8m2+3cTlQX0WYwLZRSpMYSjA36rib 03rMEPFbKXi9jUoCWEUc4lpc6tgk98UF91ePlGzJAjq7Ddh1fVfP6Zjo5VeU/LM0P46Y kzoXsaj/OSQDXYTi3cmN5j/Ph9HarSr9/7HKEVar18nhun+jeV7FgBoQSinL6oBEH4Xc 7811N/82zLAtzZyMu0djQTgX4JGI2u2N2zFNw7ylIKdqvfWMTSI7JOn6Wp21HfYF17AH GGYrbUHgYoTDuj1MtXG962Fkbq9ddBUWakLk0sPW0U27C3/Ltd3rNRHDvgleuinVOiOZ Fokg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jQD4aL90; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 5b1f17b1804b1-488b272087bsor3371735e9.21.2026.04.06.06.41.12 for (Google Transport Security); Mon, 06 Apr 2026 06:41:12 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Forwarded-Encrypted: i=1; AJvYcCWSJAgzbbJt/xwjQYyPPQODv3YCdEiDtNye/KU7S+XOpgVOkfjqc8eKkvhWpf7aBEemvc/g/u8Pdw4VfNVs@amarulasolutions.com X-Gm-Gg: AeBDieueOPlcyAvVTA0p0Vp5SH6rq9E4sib3tkSZBqNCGvZVvgKv6fl8Mjbz+bo0eIV xHf5MQXBAcmKJ/iup3Im8jvKun5lLG2eP8NFPaaIHy9Ws8GIQXhfYG1M7/gsZYykh/2Nghw9fgv i2+wHnBvQ8ilaNM6lArm8oW2tkGUvQfWYcaEDPDLduYHJdOonCu0oaDX+NmtmXl4h9msdbCIHIV pgO23GSkWiT+Psj66zcDA8Bk2L0XpOvqtT7tjmR6w64rXyG1Pot2a+fWuWFs44wykQMgY5Nt552 oznROZ9KKFPtTQZyc12U7KEVdPeVZCpgPSEHJf3bdOsDDgO4RcdHbG9w2GUpTUwhMCiX8iDoFOh nBZ7o4G84HgY5ERdK/0ez3NeupjRKi2xOBg52Zln/DzcjoSWxpBl0lMqxaT8slSLtAEz13N6FMJ mVR+sBk5Ux6j7Oil1/uxTQ3jS9kWB2rOMCX2vRuq/oMO12wL+mkqMhf9pmqnN0Y4OJZNbA4J5ty 8jmsO2cui9s6Z2TpXrGdH+y54fTKwEO8rl8vO8h6AQpmten1RWQQQCKmXOpbF7AHzPkXysPH6eU UFKk81M0MdE4/7tXKOAH4DYxaT1bNUo2duI= X-Received: by 2002:a05:600c:1396:b0:486:fb0b:ad79 with SMTP id 5b1f17b1804b1-488997d10ffmr187763225e9.20.1775482870950; Mon, 06 Apr 2026 06:41:10 -0700 (PDT) Received: from dario-ThinkPad-P14s-Gen-5.homenet.telecomitalia.it (host-87-9-100-184.retail.telecomitalia.it. [87.9.100.184]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488a8ddfde7sm283967485e9.5.2026.04.06.06.41.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2026 06:41:10 -0700 (PDT) From: Dario Binacchi To: buildroot@buildroot.org Cc: Dario Binacchi , linux-amarula@amarulasolutions.com Subject: [PATCH 1/1] package/libgphoto2: fix build with gcc >= 14 Date: Mon, 6 Apr 2026 15:41:06 +0200 Message-ID: <20260406134106.4145818-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jQD4aL90; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The commit adds an upstream patch to fix the following build failure: jl2005c/jl2005bcd_decompress.c: In function 'jl2005bcd_decompress': jl2005c/jl2005bcd_decompress.c:161:46: error: passing argument 3 of 'jpeg_mem_dest' from incompatible pointer type [-Wincompatible-pointer-types] 161 | jpeg_mem_dest (&cinfo, &jpeg_header, &jpeg_header_size); | ^~~~~~~~~~~~~~~~~ | | | long unsigned int * Fixes: - https://autobuild.buildroot.org/results/cb983d9ad90170aa8d7f2b9a5dfc30055d83b5de Signed-off-by: Dario Binacchi Tested-by: Edgar Bonet --- ...s-for-the-size-type-of-jpeg_mem_dest.patch | 143 ++++++++++++++++++ package/libgphoto2/libgphoto2.mk | 2 + 2 files changed, 145 insertions(+) create mode 100644 package/libgphoto2/0001-autoconf-checks-for-the-size-type-of-jpeg_mem_dest.patch diff --git a/package/libgphoto2/0001-autoconf-checks-for-the-size-type-of-jpeg_mem_dest.patch b/package/libgphoto2/0001-autoconf-checks-for-the-size-type-of-jpeg_mem_dest.patch new file mode 100644 index 000000000000..543678181b06 --- /dev/null +++ b/package/libgphoto2/0001-autoconf-checks-for-the-size-type-of-jpeg_mem_dest.patch @@ -0,0 +1,143 @@ +From ca4441f48117c681cecfb3c883115e0546aed985 Mon Sep 17 00:00:00 2001 +From: Marcus Meissner +Date: Sun, 29 Mar 2026 21:31:49 +0200 +Subject: [PATCH] autoconf checks for the size type of jpeg_mem_dest + +fixes https://github.com/gphoto/libgphoto2/pull/1176 + +Signed-off-by: Dario Binacchi +Upstream: https://github.com/gphoto/libgphoto2/commit/ca4441f48117c681cecfb3c883115e0546aed985 +--- + camlibs/ax203/ax203.c | 2 +- + camlibs/ax203/ax203_compress_jpeg.c | 2 +- + camlibs/ax203/jpeg_memsrcdest.h | 2 ++ + camlibs/jl2005c/jl2005bcd_decompress.c | 2 +- + camlibs/jl2005c/jpeg_memsrcdest.h | 2 ++ + camlibs/ptp2/chdk.c | 2 +- + libgphoto2_port/gphoto-m4/gp-libjpeg.m4 | 32 +++++++++++++++++++++++++ + 7 files changed, 40 insertions(+), 4 deletions(-) + +diff --git a/camlibs/ax203/ax203.c b/camlibs/ax203/ax203.c +index 62f572686c44..b9db8ebdabf1 100644 +--- a/camlibs/ax203/ax203.c ++++ b/camlibs/ax203/ax203.c +@@ -1202,7 +1202,7 @@ ax203_encode_image(Camera *camera, int **src, char *dest, unsigned int dest_size + struct jpeg_compress_struct cinfo; + struct jpeg_error_mgr jcerr; + JOCTET *jpeg_dest = NULL; +- unsigned long jpeg_size = 0; ++ JPEG_SIZE jpeg_size = 0; + JSAMPLE row[camera->pl->width * 3]; + JSAMPROW row_pointer[1] = { row }; + #endif +diff --git a/camlibs/ax203/ax203_compress_jpeg.c b/camlibs/ax203/ax203_compress_jpeg.c +index 1ec7534ff484..22068afd79c0 100644 +--- a/camlibs/ax203/ax203_compress_jpeg.c ++++ b/camlibs/ax203/ax203_compress_jpeg.c +@@ -124,7 +124,7 @@ ax206_compress_jpeg(Camera *camera, int **in, uint8_t *outbuf, int out_size, + jvirt_barray_ptr *in_coefficients; + unsigned int i, x, y; + int stop, size, ret, outc; +- unsigned long regular_jpeg_size = 0, buf_size = 0; ++ JPEG_SIZE regular_jpeg_size = 0, buf_size = 0; + int last_dc_val[3] = { 0, 0, 0 }; + + /* We have a rgb24bit image in the desired dimensions, first we +diff --git a/camlibs/ax203/jpeg_memsrcdest.h b/camlibs/ax203/jpeg_memsrcdest.h +index 674ab7128f8e..22ba2ac1e2c7 100644 +--- a/camlibs/ax203/jpeg_memsrcdest.h ++++ b/camlibs/ax203/jpeg_memsrcdest.h +@@ -5,6 +5,8 @@ + + #if JPEG_LIB_VERSION < 80 && !defined(MEM_SRCDST_SUPPORTED) + ++#define JPEG_SIZE unsigned long ++ + void + jpeg_mem_src (j_decompress_ptr cinfo, unsigned char * buffer, + unsigned long bufsize); +diff --git a/camlibs/jl2005c/jl2005bcd_decompress.c b/camlibs/jl2005c/jl2005bcd_decompress.c +index dff2d6264025..8c3307fd6098 100644 +--- a/camlibs/jl2005c/jl2005bcd_decompress.c ++++ b/camlibs/jl2005c/jl2005bcd_decompress.c +@@ -85,7 +85,7 @@ jl2005bcd_decompress (unsigned char *output, unsigned char *input, + struct jpeg_error_mgr jcerr, jderr; + JOCTET *jpeg_header = NULL; + int outputsize = 0; +- unsigned long jpeg_header_size = 0; ++ JPEG_SIZE jpeg_header_size = 0; + int i, x, y, x1, y1, jpeg_data_size, jpeg_data_idx, eoi, size, ret; + JSAMPLE green[8 * 16]; + JSAMPLE red[8 * 8]; +diff --git a/camlibs/jl2005c/jpeg_memsrcdest.h b/camlibs/jl2005c/jpeg_memsrcdest.h +index 4334e099688a..94fca070d05b 100644 +--- a/camlibs/jl2005c/jpeg_memsrcdest.h ++++ b/camlibs/jl2005c/jpeg_memsrcdest.h +@@ -5,6 +5,8 @@ + + #if JPEG_LIB_VERSION < 80 && !defined(MEM_SRCDST_SUPPORTED) + ++#define JPEG_SIZE unsigned long ++ + void + jpeg_mem_src (j_decompress_ptr cinfo, unsigned char * buffer, + unsigned long bufsize); +diff --git a/camlibs/ptp2/chdk.c b/camlibs/ptp2/chdk.c +index 2787a7261c4a..2646c3ba0fb1 100644 +--- a/camlibs/ptp2/chdk.c ++++ b/camlibs/ptp2/chdk.c +@@ -1145,7 +1145,7 @@ static void yuv_live_to_jpeg(unsigned char *p_yuv, + struct jpeg_error_mgr jerr; + JSAMPROW row_ptr[1]; + uint8_t *outbuf = NULL, *tmprowbuf = NULL; +- unsigned long outlen = 0; ++ JPEG_SIZE outlen = 0; + unsigned int row_inc; + int sshift, dshift, xshift, skip; + +diff --git a/libgphoto2_port/gphoto-m4/gp-libjpeg.m4 b/libgphoto2_port/gphoto-m4/gp-libjpeg.m4 +index ce9e816fdbce..4870882a686d 100644 +--- a/libgphoto2_port/gphoto-m4/gp-libjpeg.m4 ++++ b/libgphoto2_port/gphoto-m4/gp-libjpeg.m4 +@@ -77,6 +77,38 @@ found and made to work. + GP_CONFIG_MSG([JPEG mangling support], + [${have_libjpeg}]) + ]) ++ dnl find type of memdest ++ AC_LANG_PUSH([C]) ++ ++ AC_MSG_CHECKING([type of jpeg_mem_dest size]) ++ AC_COMPILE_IFELSE([ ++ #include ++ #include ++ #include ++ void f(j_compress_ptr cinfo, unsigned char ** outbuffer, unsigned long * outsize) { ++ jpeg_mem_dest(cinfo, outbuffer, outsize); ++ } ++ ],[ ++ AC_MSG_RESULT([unsigned long*]) ++ AC_DEFINE([JPEG_SIZE],[unsigned long], "JPEG memdest size type") ++ ],[ ++ AC_COMPILE_IFELSE([ ++ #include ++ #include ++ #include ++ void f(j_compress_ptr cinfo, unsigned char ** outbuffer, size_t * outsize) { ++ jpeg_mem_dest(cinfo, outbuffer, outsize); ++ } ++ ],[ ++ AC_MSG_RESULT([size_t*]) ++ AC_DEFINE([JPEG_SIZE],[size_t], "JPEG memdest size type") ++ ],[ ++ AC_MSG_RESULT([unknown, using unsigned long*]) ++ AC_DEFINE([JPEG_SIZE],[unsigned long], "JPEG memdest size type") ++ ]) ++ ] ++ ) ++ AC_LANG_POP([C]) + ], + [AC_MSG_ERROR([ + Unhandled value given to --with-jpeg: ${with_jpeg} +-- +2.43.0 + diff --git a/package/libgphoto2/libgphoto2.mk b/package/libgphoto2/libgphoto2.mk index 95c0190ee63d..4265d1c57e10 100644 --- a/package/libgphoto2/libgphoto2.mk +++ b/package/libgphoto2/libgphoto2.mk @@ -9,6 +9,8 @@ LIBGPHOTO2_SOURCE = libgphoto2-$(LIBGPHOTO2_VERSION).tar.xz LIBGPHOTO2_SITE = https://github.com/gphoto/libgphoto2/releases/download/v$(LIBGPHOTO2_VERSION) LIBGPHOTO2_LICENSE = LGPL-2.1+, GPL-2.0 (adc65), GPL-2.0+ (some camlibs), \ LGPL-2.0 (sipix), LGPL-3.0+ (pentax), BSD-3-Clause (ax203/tinyjpeg) +# 0001-autoconf-checks-for-the-size-type-of-jpeg_mem_dest.patch +LIBGPHOTO2_AUTORECONF = YES # There is a single license file for the LGPL-2.1, no license files # for other licenses LIBGPHOTO2_LICENSE_FILES = COPYING