Go to file
Rahul Bedarkar f827fada63 logrotate: fix build with gcc 6
With gcc version 6, we get the following error when building logrotate:

  logrotate.c: In function 'postrotateSingleLog':
  logrotate.c:1784:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
       if (!state->doRotate)
       ^~
  logrotate.c:1787:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
    if (!hasErrors && log->flags & LOG_FLAG_TMPFILENAME) {
    ^~

This is fixed by grabbing an upstream commit,
6a36c105587b07ad14fc937f3ee6e2eb402621a2. Once this is fixed, we get:

  config.c: In function 'strndup':
  config.c:87:10: error: nonnull argument 's' compared to NULL [-Werror=nonnull-compare]
          if(!s)
            ^
  cc1: all warnings being treated as errors
  make[2]: *** [config.o] Error 1
  make[2]: *** Waiting for unfinished jobs....
  cc1: all warnings being treated as errors
  make[2]: *** [logrotate.o] Error 1

This is due to logrotate providing its own implementation of
strndup(). We could fix it, but it much better to simply use the one
provided by the C library, by fixing the detection method for strndup
availability. This is done in patch
0002-Use-autoconf-checks-for-strndup-and-asprintf.patch.

Fixes:

  http://autobuild.buildroot.net/results/6dc2eb22104076920d77425b1e608ef9b9e01c94/

Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
[Thomas: replace fix for the nonnull issue with a different one.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-19 22:55:24 +02:00
arch
board
boot
configs
docs docs: update legal-notice.txt 2016-08-19 16:20:47 +02:00
fs
linux linux: cpupower needs gettext 2016-08-19 11:26:43 +02:00
package logrotate: fix build with gcc 6 2016-08-19 22:55:24 +02:00
support pkg-cmake.mk: set CMAKE_SYSROOT variable in toolchainfile.cmake 2016-08-18 22:27:19 +02:00
system
toolchain package/musl-compat-headers: provide compatibility headers not in musl 2016-08-19 11:29:12 +02:00
.defconfig
.gitignore
CHANGES Update for 2016.08-rc2 2016-08-17 08:49:38 +02:00
Config.in
Config.in.legacy
COPYING
Makefile Update for 2016.08-rc2 2016-08-17 08:49:38 +02:00
Makefile.legacy
README

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on Freenode IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches