소스 검색

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 년 전
부모
커밋
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.
     - Do not run qsort() over the scandir() list if it is NULL.
     - Add a setexecfilecon() compatibility function out from dpkg code.
     - Add a setexecfilecon() compatibility function out from dpkg code.
   * Use SELinux setexecfilecon() if available in dpkg instead of ad-hoc 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 ]
   [ Updated programs translations ]
   * Danish (Joe Dalton). Closes: #754127
   * Danish (Joe Dalton). Closes: #754127

+ 2 - 1
lib/dpkg/trigdeferred.l

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

+ 1 - 1
src/trigproc.c

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