python-libfaketime icon indicating copy to clipboard operation
python-libfaketime copied to clipboard

libfaketime build issues on gcc 11 and glibc 2.34

Open vlaci opened this issue 3 years ago • 0 comments

This patch resolves the issue for me https://github.com/wolfcw/libfaketime/commit/0d964363a4352b7ee358f523c3416d07378d4583

  make[1]: Entering directory '/build/libfaketime-2.0.0/libfaketime/vendor/libfaketime/src'
  gcc -o libfaketime.o -c -std=gnu99 -Wall -Wextra -Werror -Wno-nonnull-compare -fPIC -DPREFIX='"'/usr/local'"' -DLIBDIRNAME='"'/lib/faketime'"'   libfaketime.c
  In file included from /nix/store/1dlzfarjz8g5hx8zhcvsglbp8bqing4r-glibc-2.34-210-dev/include/string.h:519,
                   from libfaketime.c:36:
  In function ‘strncpy’,
      inlined from ‘fake_clock_gettime.part.0’ at libfaketime.c:2095:5:
  /nix/store/1dlzfarjz8g5hx8zhcvsglbp8bqing4r-glibc-2.34-210-dev/include/bits/string_fortified.h:95:10: error: ‘__builtin_strncpy’ specified bound 256 equals destination size [-Werror=stringop-truncation]
     95 |   return __builtin___strncpy_chk (__dest, __src, __len,
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     96 |                                   __glibc_objsize (__dest));
        |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~
  cc1: all warnings being treated as errors

vlaci avatar Jul 21 '22 15:07 vlaci