Просмотр исходного кода

Replace obsolete <sys/fcntl.h> with <fcntl.h>

The standard location <fcntl.h> instead of <sys/fcntl.h> is the
preferred one since a long time (Changelog.old mentions this change
being made in 1996).

This patch fixes the two occurrences that have slipped through, making
the includes consistent with other files in dpkg as well as fixing
compiling on e.g. Android which lacks <sys/fcntl.h>.

Closes: #752036

Signed-off-by: Guillem Jover <guillem@debian.org>
Fredrik Fornwall лет назад: 12
Родитель
Сommit
73bc422dee
3 измененных файлов с 5 добавлено и 2 удалено
  1. 2 0
      debian/changelog
  2. 2 1
      lib/dpkg/trigdeferred.l
  3. 1 1
      src/trigproc.c

+ 2 - 0
debian/changelog

@@ -10,6 +10,8 @@ dpkg (1.17.11) UNRELEASED; urgency=low
     - Do not run qsort() over the scandir() list if it is NULL.
     - Add a setexecfilecon() compatibility function out from dpkg code.
   * Use SELinux setexecfilecon() if available in dpkg instead of ad-hoc code.
+  * Replace obsolete <sys/fcntl.h> with <fcntl.h>, which fixes compilation on
+    Android. Thanks to Fredrik Fornwall <fredrik@fornwall.net>. Closes: #752036
 
   [ Updated programs translations ]
   * Danish (Joe Dalton). Closes: #754127

+ 2 - 1
lib/dpkg/trigdeferred.l

@@ -41,7 +41,8 @@
 
 %{
 #include <sys/stat.h>
-#include <sys/fcntl.h>
+
+#include <fcntl.h>
 
 #include <dpkg/i18n.h>
 #include <dpkg/dpkg.h>

+ 1 - 1
src/trigproc.c

@@ -23,10 +23,10 @@
 #include <config.h>
 #include <compat.h>
 
-#include <sys/fcntl.h>
 #include <sys/stat.h>
 
 #include <assert.h>
+#include <fcntl.h>
 #include <stdlib.h>
 
 #include <dpkg/i18n.h>