rootdev: Use large file support (LFS) Without LFS, stat fails with -EOVERFLOW on devices with major:minor numbers that don't fit within 8 bits on 32-bit architecutres. This patch turns on LFS to allow that, fixing a bringup but on a new platform. BUG=chromium:464024 TEST=Booted onto a machine and successfully ran rootdev with a large major:minor number. Change-Id: I3dfe698e65366f4608705f56894988d2643e375f Signed-off-by: Dan Ehrenberg <dehrenberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/258550 Reviewed-by: Mike Frysinger <vapier@chromium.org> Commit-Queue: Mike Frysinger <vapier@chromium.org>
diff --git a/Makefile b/Makefile index 1575f3a..5e83c57 100644 --- a/Makefile +++ b/Makefile
@@ -1,8 +1,12 @@ -# Copyright (C) 2010 The Chromium OS Authors. All rights reserved. +# Copyright (c) 2010 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. CFLAGS += -Wall -Werror + +# Support large files and major:minor numbers +CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE + OUT = $(CURDIR) $(shell mkdir -p $(OUT))