public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/catimg] epel10: Improve C99 compatibility
Date: Thu, 08 Oct 2026 12:44:59 GMT	[thread overview]
Message-ID: <179146349966.1.5337303064449761434.rpms-catimg-2b1fe7cf0a74@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/catimg
            Branch : epel10
            Commit : 2b1fe7cf0a74e042272f56d37f916d3f7b781b25
            Author : Florian Weimer <fweimer@redhat.com>
            Date   : 2022-12-22T08:49:57+01:00
            Stats  : +24/-2 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/catimg/c/2b1fe7cf0a74e042272f56d37f916d3f7b781b25?branch=epel10

            Log:
            Improve C99 compatibility

Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>

---
diff --git a/catimg-c99.patch b/catimg-c99.patch
new file mode 100644
index 0000000..181bbdf
--- /dev/null
+++ b/catimg-c99.patch
@@ -0,0 +1,18 @@
+Build with -std=gnu99 instead of -std=c99, so that <unistd.h> declares
+the usleep function, as used in catimg.c.
+
+Submitted upstream: <https://github.com/posva/catimg/pull/71>
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0a4edcbe9f1e0e93..d82568e2073a524a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -10,7 +10,7 @@ endif()
+ # set some options
+ #set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wextra -g -std=c99 -Wno-unused-result")
+ #set(CMAKE_BUILD_TYPE Debug)
+-set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wall -Wextra -Os -std=c99 -Wno-unused-result")
++set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wall -Wextra -Os -std=gnu99 -Wno-unused-result")
+ set(CMAKE_BUILD_TYPE Release)
+ 
+ set(SRC ${PROJECT_SOURCE_DIR}/src)

diff --git a/catimg.spec b/catimg.spec
index 3ac39e2..32760b0 100644
--- a/catimg.spec
+++ b/catimg.spec
@@ -1,11 +1,12 @@
 Name:           catimg
 Version:        2.7.0
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        Print images in a terminal with 256 colors support
 
 License:        MIT
 URL:            https://github.com/posva/catimg
 Source0:        %{URL}/archive/%{version}/%{name}-%{version}.tar.gz
+Patch0: catimg-c99.patch
 
 BuildRequires:  cmake >= 2.8
 BuildRequires:  gcc-c++
@@ -15,7 +16,7 @@ BuildRequires:  gcc-c++
 JPEG, PNG, ICO and GIF formats.
 
 %prep
-%autosetup
+%autosetup -p1
 
 %build
 %cmake
@@ -35,6 +36,9 @@ install -D --preserve-timestamps --mode 644 completion/_catimg %{buildroot}%{_da
 %{_mandir}/man1/%{name}.1*
 
 %changelog
+* Thu Dec 22 2022 Florian Weimer <fweimer@redhat.com> - 2.7.0-7
+- Improve C99 compatibility
+
 * Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.0-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
 

                 reply	other threads:[~2026-10-08 12:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179146349966.1.5337303064449761434.rpms-catimg-2b1fe7cf0a74@fedoraproject.org \
    --to=fweimer@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox