Define _GNU_SOURCE in lockdev.c

This commit is contained in:
Jiri Popelka 2013-12-05 12:00:07 +01:00
parent e5985a76ee
commit 231faa4985
2 changed files with 21 additions and 7 deletions

View File

@ -1,7 +1,18 @@
diff -up lockdev-scm-2011-10-07/src/lockdev.c.access lockdev-scm-2011-10-07/src/lockdev.c
--- lockdev-scm-2011-10-07/src/lockdev.c.access 2011-07-22 09:37:10.000000000 +0200
+++ lockdev-scm-2011-10-07/src/lockdev.c 2013-06-03 12:34:16.870750845 +0200
@@ -616,7 +616,10 @@ dev_lock (const char *devname)
+++ lockdev-scm-2011-10-07/src/lockdev.c 2013-12-05 11:56:57.836961642 +0100
@@ -95,6 +95,10 @@
*
*/
+#ifndef _GNU_SOURCE
+ #define _GNU_SOURCE
+#endif
+
#include <errno.h>
#include <signal.h>
#include <stdio.h>
@@ -616,7 +620,10 @@ dev_lock (const char *devname)
if ( stat( device, &statbuf) == -1 ) {
close_n_return(-errno);
}
@ -13,7 +24,7 @@ diff -up lockdev-scm-2011-10-07/src/lockdev.c.access lockdev-scm-2011-10-07/src/
close_n_return(-errno);
}
@@ -780,7 +783,10 @@ dev_relock (const char *devname,
@@ -780,7 +787,10 @@ dev_relock (const char *devname,
if ( stat( device, &statbuf) == -1 ) {
close_n_return(-errno);
}
@ -25,7 +36,7 @@ diff -up lockdev-scm-2011-10-07/src/lockdev.c.access lockdev-scm-2011-10-07/src/
close_n_return(-errno);
}
@@ -870,7 +876,10 @@ dev_unlock (const char *devname,
@@ -870,7 +880,10 @@ dev_unlock (const char *devname,
if ( stat( device, &statbuf) == -1 ) {
close_n_return(-errno);
}

View File

@ -10,7 +10,7 @@
Summary: A library for locking devices
Name: lockdev
Version: 1.0.4
Release: 0.13.%{checkout}%{?dist}
Release: 0.14.%{checkout}%{?dist}
License: LGPLv2
Group: System Environment/Libraries
URL: https://alioth.debian.org/projects/lockdev/
@ -63,8 +63,8 @@ touch ChangeLog
# Bootstrap autotools
autoreconf --verbose --force --install
CFLAGS="${RPM_OPT_FLAGS} -D_GNU_SOURCE -D_PATH_LOCK=\\\"%{_lockdir}\\\"" \
%configure --disable-static --enable-helper
CFLAGS="%{optflags} -D_PATH_LOCK=\\\"%{_lockdir}\\\"" \
%configure --disable-static --enable-helper --disable-silent-rules
make %{?_smp_mflags}
@ -104,6 +104,9 @@ fi
%{_includedir}/*
%changelog
* Thu Dec 05 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.4-0.14.20111007git
- Define _GNU_SOURCE in lockdev.c
* Thu Nov 28 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.4-0.13.20111007git
- revert previous change and use %%tmpfiles_create in %%post