Include sys/types.h to avoid compilation warnings:
In file included from $LINUX/usr/include/linux/byteorder/little_endian.h:12:0,
from $LINUX/usr/include/asm/byteorder.h:5,
from $KLIBC/usr/klibc/../include/klibc/endian.h:11,
from $KLIBC/usr/klibc/../include/endian.h:8,
from $KLIBC/usr/klibc/pread.c:7:
$LINUX/usr/include/linux/types.h:22:0: warning: "__bitwise"
redefined
In file included from $KLIBC/usr/klibc/../include/klibc/endian.h:10:0,
from $KLIBC/usr/klibc/../include/endian.h:8,
from $KLIBC/usr/klibc/pread.c:7:
$KLIBC/usr/klibc/../include/klibc/compiler.h:144:0: note: this is the location
of the previous definition
In file included from $LINUX/usr/include/linux/byteorder/little_endian.h:12:0,
from $LINUX/usr/include/asm/byteorder.h:5,
from $KLIBC/usr/klibc/../include/klibc/endian.h:11,
from $KLIBC/usr/klibc/../include/endian.h:8,
from $KLIBC/usr/klibc/pwrite.c:7:
$LINUX/usr/include/linux/types.h:22:0: warning: "__bitwise"
redefined
In file included from $KLIBC/usr/klibc/../include/klibc/endian.h:10:0,
from $KLIBC/usr/klibc/../include/endian.h:8,
from $KLIBC/usr/klibc/pwrite.c:7:
$KLIBC/usr/klibc/../include/klibc/compiler.h:144:0: note: this is the location
of the previous definition
Signed-off-by: Greg Thelen <gthelen at google.com>
---
usr/klibc/pread.c | 1 +
usr/klibc/pwrite.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/usr/klibc/pread.c b/usr/klibc/pread.c
index 0d8c3b13f4fc..1ac30756c32d 100644
--- a/usr/klibc/pread.c
+++ b/usr/klibc/pread.c
@@ -4,6 +4,7 @@
* Some architectures need to wrap the system call
*/
+#include <sys/types.h>
#include <endian.h>
#include <sys/syscall.h>
diff --git a/usr/klibc/pwrite.c b/usr/klibc/pwrite.c
index 691d0e4a1a74..19b219f163fc 100644
--- a/usr/klibc/pwrite.c
+++ b/usr/klibc/pwrite.c
@@ -4,6 +4,7 @@
* Some architectures need to wrap the system call
*/
+#include <sys/types.h>
#include <endian.h>
#include <sys/syscall.h>
--
2.16.1.291.g4437f3f132-goog
Fix compilation warnings:
$KLIBC/usr/klibc/asprintf.c: In function 'asprintf':
$KLIBC/usr/klibc/asprintf.c:14:8: warning: unused variable 'p'
[-Wunused-variable]
char *p;
$KLIBC/usr/klibc/asprintf.c:13:6: warning: unused variable 'bytes'
[-Wunused-variable]
int bytes;
$KLIBC/usr/utils/readlink.c: In function 'main':
$KLIBC/usr/utils/readlink.c:20:6: warning: unused variable 'i'
[-Wunused-variable]
int i;
Signed-off-by: Greg Thelen <gthelen at google.com>
---
usr/klibc/asprintf.c | 2 --
usr/utils/readlink.c | 1 -
2 files changed, 3 deletions(-)
diff --git a/usr/klibc/asprintf.c b/usr/klibc/asprintf.c
index ce3aa76928e4..42f3aa2daeb8 100644
--- a/usr/klibc/asprintf.c
+++ b/usr/klibc/asprintf.c
@@ -10,8 +10,6 @@ int asprintf(char **bufp, const char *format, ...)
{
va_list ap;
int rv;
- int bytes;
- char *p;
va_start(ap, format);
rv = vasprintf(bufp, format, ap);
diff --git a/usr/utils/readlink.c b/usr/utils/readlink.c
index ffb0b1f70642..1f16c02d05cd 100644
--- a/usr/utils/readlink.c
+++ b/usr/utils/readlink.c
@@ -17,7 +17,6 @@ int main(int argc, char *argv[])
const char *name;
char link_name[PATH_MAX];
int rv;
- int i;
progname = argv[0];
--
2.16.1.291.g4437f3f132-goog
Signed-off-by: Greg Thelen <gthelen at google.com>
---
klcc/Kbuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/klcc/Kbuild b/klcc/Kbuild
index 48c8b07bba98..ce6e4bbd599a 100644
--- a/klcc/Kbuild
+++ b/klcc/Kbuild
@@ -7,7 +7,7 @@ always := $(KLIBCCROSS)klcc
$(obj)/$(KLIBCCROSS)klibc.config: $(src)/Kbuild \
$(srctree)/Makefile \
$(srctree)/scripts/Kbuild.klibc
- @echo " GEN $@"
+ @echo ' GEN $@'
$(Q)rm -f $@
$(Q)echo 'ARCH=$(KLIBCARCH)' >> $@
$(Q)echo 'ARCHDIR=$(KLIBCARCHDIR)' >> $@
--
2.16.1.291.g4437f3f132-goog
Use $(kecho) to remove 'GEN klcc/klibc.config' log message from
'make --silent' output.
Signed-off-by: Greg Thelen <gthelen at google.com>
---
klcc/Kbuild | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/klcc/Kbuild b/klcc/Kbuild
index ce6e4bbd599a..e62c3f12015f 100644
--- a/klcc/Kbuild
+++ b/klcc/Kbuild
@@ -7,7 +7,7 @@ always := $(KLIBCCROSS)klcc
$(obj)/$(KLIBCCROSS)klibc.config: $(src)/Kbuild \
$(srctree)/Makefile \
$(srctree)/scripts/Kbuild.klibc
- @echo ' GEN $@'
+ @$(kecho) ' GEN $@'
$(Q)rm -f $@
$(Q)echo 'ARCH=$(KLIBCARCH)' >> $@
$(Q)echo 'ARCHDIR=$(KLIBCARCHDIR)' >> $@
--
2.16.1.291.g4437f3f132-goog