summaryrefslogtreecommitdiff
path: root/support/misc
diff options
context:
space:
mode:
authorDoug Nazar <nazard@nazar.ca>2019-11-17 14:31:33 -0500
committerSteve Dickson <steved@redhat.com>2019-11-17 14:32:31 -0500
commit1378280398ef9f5cd45f5542ae2945b9a360b132 (patch)
treeb4a059015422f85f0ecba50c7f94c5904ae54bbb /support/misc
parentf94b16b92d49b3cd87a3d589e9ba3438ff7f5401 (diff)
downloadnfs-utils-1378280398ef9f5cd45f5542ae2945b9a360b132.tar.gz
Ensure consistent struct stat definition
Although 2fbc62e2a13fc ("Fix include order between config.h and stat.h") reorganized those files that were already including config.h, not all files were including config.h. Fixes at least stack smashing crashes in mountd on 32-bit systems. Signed-off-by: Doug Nazar <nazard@nazar.ca> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support/misc')
-rw-r--r--support/misc/file.c4
-rw-r--r--support/misc/mountpoint.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/support/misc/file.c b/support/misc/file.c
index e7c3819..06f6bb2 100644
--- a/support/misc/file.c
+++ b/support/misc/file.c
@@ -18,6 +18,10 @@
* along with nfs-utils. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <sys/stat.h>
#include <string.h>
diff --git a/support/misc/mountpoint.c b/support/misc/mountpoint.c
index c6217f2..14d6731 100644
--- a/support/misc/mountpoint.c
+++ b/support/misc/mountpoint.c
@@ -3,6 +3,10 @@
* check if a given path is a mountpoint
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <string.h>
#include "xcommon.h"
#include <sys/stat.h>