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

compile error under fedora 40 (stricter checks) #89

Open
cheese1 opened this issue Apr 26, 2024 · 2 comments
Open

compile error under fedora 40 (stricter checks) #89

cheese1 opened this issue Apr 26, 2024 · 2 comments

Comments

@cheese1
Copy link

cheese1 commented Apr 26, 2024

  • MAC Telnet version: 0.5.1
  • fedora 40 x86_64 and aarch64
  • **does not compile
gcc -DHAVE_CONFIG_H -I.  -DLOCALEDIR='"/usr/share/locale"'   -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer  -c -o protocol.o protocol.c
gcc -DHAVE_CONFIG_H -I.  -DLOCALEDIR='"/usr/share/locale"'   -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer  -c -o mndp.o mndp.c
In file included from /usr/include/libintl.h:23,
                 from protocol.c:20:
/usr/include/features.h:196:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  196 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
gcc -DHAVE_CONFIG_H -I.  -DLOCALEDIR='"/usr/share/locale"'  -DFROM_MACTELNETD -DUSERSFILE='"/etc/mactelnetd.users"' -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer  -c -o mactelnetd-mactelnetd.o `test -f 'mactelnetd.c' || echo './'`mactelnetd.c
gcc -DHAVE_CONFIG_H -I.  -DLOCALEDIR='"/usr/share/locale"'  -DFROM_MACTELNETD -DUSERSFILE='"/etc/mactelnetd.users"' -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer  -c -o mactelnetd-protocol.o `test -f 'protocol.c' || echo './'`protocol.c
In file included from /usr/include/libintl.h:23,
                 from protocol.c:20:
/usr/include/features.h:196:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  196 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
gcc -DHAVE_CONFIG_H -I.  -DLOCALEDIR='"/usr/share/locale"'  -DFROM_MACTELNETD -DUSERSFILE='"/etc/mactelnetd.users"' -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer  -c -o mactelnetd-interfaces.o `test -f 'interfaces.c' || echo './'`interfaces.c
In file included from /usr/include/libintl.h:23,
                 from mactelnetd.c:28:
/usr/include/features.h:196:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  196 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
mactelnetd.c: In function ‘uwtmp_login’:
mactelnetd.c:358:22: error: passing argument 1 of ‘gettimeofday’ from incompatible pointer type [-Wincompatible-pointer-types]
  358 |         gettimeofday(&utent.ut_tv, NULL);
      |                      ^~~~~~~~~~~~
      |                      |
      |                      struct <anonymous> *

the reason might be the same as here:
https://stackoverflow.com/questions/65987047/using-a-parameter-in-time-gives-you-incompatible-pointer-type

@haakonnessjoen
Copy link
Owner

I just pushed 21322d0, could you test out with this change?

@cheese1
Copy link
Author

cheese1 commented May 1, 2024

compiles on both x86_64 and aarch64
thanks
no further checks happened (yet) on my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants