Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | From e18bd3a571be716d90bedc835a014472470ae7bd Mon Sep 17 00:00:00 2001 |
| 2 | From: Hongxu Jia <hongxu.jia@windriver.com> |
| 3 | Date: Wed, 30 Dec 2015 10:58:39 +0800 |
| 4 | Subject: [PATCH] configure.ac: support large-file for stat64 |
| 5 | |
| 6 | While starting dbus-daemon on a 32-bit linux host and it invokes |
| 7 | fstat to load /etc/dbus-1/system.conf through NFS. If system.conf |
| 8 | was created with a large indoe number on 64-bit host. The above |
| 9 | fstat invoking failed. Here is the log of strace: |
| 10 | ............ |
| 11 | $ ls -i /etc/dbus-1/system.conf |
| 12 | 53778558109 /etc/dbus-1/system.conf |
| 13 | |
| 14 | $ strace /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation |
| 15 | |open("/etc/dbus-1/system.conf", O_RDONLY) = 4 |
| 16 | |fstat64(4, {st_mode=S_IFREG|0644, st_size=3340, ...}) = 0 |
| 17 | |close(4) = 0 |
| 18 | |close(3) = 0 |
| 19 | |write(2, "Failed to start message bus: Fai"..., 109Failed to start message bus: |
| 20 | Failed to stat "/etc/dbus-1/system.conf": Value too large for defined data type |
| 21 | |) = 109 |
| 22 | |exit_group(1) = ? |
| 23 | |+++ exited with 1 +++ |
| 24 | ............ |
| 25 | |
| 26 | In this situation, we should support large-file for stat64. Add marco |
| 27 | AC_SYS_LARGEFILE to do the detection at configure time. It can be disabled |
| 28 | by configuring with the `--disable-largefile' option. |
| 29 | |
| 30 | Upstream-Status: Backport |
| 31 | |
| 32 | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93545 |
| 33 | https://bugs.freedesktop.org/attachment.cgi?id=120747 |
| 34 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
| 35 | --- |
| 36 | configure.ac | 1 + |
| 37 | 1 file changed, 1 insertion(+) |
| 38 | |
| 39 | diff --git a/configure.ac b/configure.ac |
| 40 | index 82806ba..cb5a60b 100644 |
| 41 | --- a/configure.ac |
| 42 | +++ b/configure.ac |
| 43 | @@ -64,6 +64,7 @@ AC_SUBST(DBUS_VERSION) |
| 44 | AC_PROG_CC |
| 45 | AM_PROG_CC_C_O |
| 46 | AC_PROG_CXX |
| 47 | AC_USE_SYSTEM_EXTENSIONS |
| 48 | +AC_SYS_LARGEFILE |
| 49 | AC_ISC_POSIX |
| 50 | AC_HEADER_STDC |
| 51 | -- |
| 52 | 1.9.1 |
| 53 | |