Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: fix build failure on gcc-6.3 / glibc-2.25 (open) #464

Merged
merged 1 commit into from Mar 26, 2017
Merged

tests: fix build failure on gcc-6.3 / glibc-2.25 (open) #464

merged 1 commit into from Mar 26, 2017

Commits on Mar 26, 2017

  1. tests: fix build failure on gcc-6.3 / glibc-2.25 (open)

    Recent gcc has a mechanism to detect some function misuses
    at compile-time. In this case it's a case when open() is
    likely to create new file but access permissions are not set
    explicitly:
    
        $  LANG=C make -C tests api-tests
        gcc -g2 -O2 -Wall -fno-omit-frame-pointer -DHAVE_CONFIG_H  -DLINUX  -I.. -I../include   -c -o api/fsio.o api/fsio.c
        In file included from /usr/include/fcntl.h:313:0,
                         from /usr/include/sys/file.h:24,
                         from ../include/conf.h:93,
                         from api/tests.h:30,
                         from api/fsio.c:27:
        In function 'open',
            inlined from 'fsio_sys_access_file_test' at api/fsio.c:1059:6:
        /usr/include/bits/fcntl2.h:50:4: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments
            __open_missing_mode ();
            ^~~~~~~~~~~~~~~~~~~~~~
        make: *** [<builtin>: api/fsio.o] Error 1
    
    The change adds "u=rw" to all temp files.
    
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
    Sergei Trofimovich committed Mar 26, 2017
    Configuration menu
    Copy the full SHA
    1f2b190 View commit details
    Browse the repository at this point in the history