Bug 1220467

Summary: GCC 14: dcraw package fails
Product: [openSUSE] openSUSE Tumbleweed Reporter: Michal Jireš <michal.jires>
Component: OtherAssignee: Fridrich Strba <fstrba>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: jubalh, mjambor, mvetter
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 1220571    

Description Michal Jireš 2024-02-27 14:58:35 UTC
Building dcraw with GCC 14 fails here:
https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:Gcc7/dcraw/standard/x86_64

Due to:
fuji_green.c: In function ‘read_shorts’:
fuji_green.c:75:5: error: implicit declaration of function ‘swab’ [-Wimplicit-function-declaration]
   75 |     swab (pixel, pixel, count*2);
      |     ^~~~

fujiturn.c: In function ‘main’:
fujiturn.c:76:37: error: implicit declaration of function ‘ntohs’ [-Wimplicit-function-declaration]
   76 |           mid[orow*owide+ocol][i] = ntohs(in[icol][i]);
      |                                     ^~~~~
fujiturn.c:90:28: error: implicit declaration of function ‘htons’ [-Wimplicit-function-declaration]
   90 |             out[ocol][i] = htons (
      |                            ^~~~~


Builds with:

Index: dcraw.spec_dir/dcraw/fuji_green.c
===================================================================
--- dcraw.spec_dir.orig/dcraw/fuji_green.c
+++ dcraw.spec_dir/dcraw/fuji_green.c
@@ -5,6 +5,7 @@
    $Date: 2006/03/01 01:46:47 $
  */

+#define _XOPEN_SOURCE
 #include <ctype.h>
 #include <math.h>
 #include <setjmp.h>
Index: dcraw.spec_dir/dcraw/fujiturn.c
===================================================================
--- dcraw.spec_dir.orig/dcraw/fujiturn.c
+++ dcraw.spec_dir/dcraw/fujiturn.c
@@ -15,6 +15,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <fcntl.h>
+#include <arpa/inet.h>

 #ifdef _16BIT
 typedef unsigned short value;
Comment 1 Michael Vetter 2024-02-28 07:48:03 UTC
Thanks for the report. Do you plan to create a submit request?
Comment 2 Michal Jireš 2024-02-29 15:23:03 UTC
(In reply to Michael Vetter from comment #1)
> Thanks for the report. Do you plan to create a submit request?

No sorry. I am doing this for many packages, so I leave the final resolution to people more familiar with the individual package.
Comment 3 Michal Jireš 2024-02-29 15:46:16 UTC
(In reply to Michal Jireš from comment #2)
> (In reply to Michael Vetter from comment #1)
> > Thanks for the report. Do you plan to create a submit request?
> 
> No sorry. I am doing this for many packages, so I leave the final resolution
> to people more familiar with the individual package.

Nevermind, I will submit the request. (Originally I assumed more cases will be handled upstream)
Comment 4 Fridrich Strba 2024-03-07 13:25:00 UTC
Integrated in factory