[dt] patch: fix build failure due to deprecated defines

okozina okozina at fedoraproject.org
Wed Sep 24 15:52:54 UTC 2014


commit a3107b34a3efc6af66a5f892514f233bb66eb6b5
Author: Ondrej Kozina <okozina at redhat.com>
Date:   Wed Sep 24 17:49:15 2014 +0200

    patch: fix build failure due to deprecated defines
    
    add detection for _DEFAULT_SOURCE in common.h header file. This
    way dt can properly detect whether it's being build on 32bit Linux
    archs.

 dt-default-source-define.patch |   12 ++++++++++++
 dt.spec                        |    2 ++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/dt-default-source-define.patch b/dt-default-source-define.patch
new file mode 100644
index 0000000..2b7b2df
--- /dev/null
+++ b/dt-default-source-define.patch
@@ -0,0 +1,12 @@
+diff -rupN dt.v18.32.old/common.h dt.v18.32/common.h
+--- dt.v18.32.old/common.h	2013-03-01 23:52:30.000000000 +0100
++++ dt.v18.32/common.h	2014-09-24 17:41:40.777604710 +0200
+@@ -127,7 +127,7 @@ typedef volatile slarge_t	v_slarge;
+ 
+ #endif /* defined(_WIN64) */
+ 
+-#elif defined(__GNUC__) && defined(_BSD_SOURCE) || defined(SCO) || defined(__QNXNTO__) || defined(SOLARIS) || defined(HP_UX) || defined(AIX) || defined(_NT_SOURCE) 
++#elif defined(__GNUC__) && defined(_BSD_SOURCE) || defined (_DEFAULT_SOURCE) ||  defined(SCO) || defined(__QNXNTO__) || defined(SOLARIS) || defined(HP_UX) || defined(AIX) || defined(_NT_SOURCE) 
+ 
+ #define QuadIsLongLong
+ typedef unsigned long long int	large_t;
diff --git a/dt.spec b/dt.spec
index 5837f12..378ead1 100644
--- a/dt.spec
+++ b/dt.spec
@@ -11,6 +11,7 @@ URL:		http://www.scsifaq.org/RMiller_Tools/dt.html
 Source0: http://dl.dropboxusercontent.com/u/32363629/Datatest/dt-source-v%{version}.tar.gz
 Patch0: dt-manpage.patch
 Patch1: dt-wformat-security.patch
+Patch2: dt-default-source-define.patch
 
 %description
 dt is a generic data test program used to verify proper operation of
@@ -37,6 +38,7 @@ scripts and config data are installed in %{_datadir}/%{name}.
 %setup -q -n dt.v%{version}
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 mkdir tmp


More information about the scm-commits mailing list