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

build: The <sys/sysctl.h> header is deprecated #523

Open
gperciva opened this issue Jan 25, 2022 · 0 comments
Open

build: The <sys/sysctl.h> header is deprecated #523

gperciva opened this issue Jan 25, 2022 · 0 comments
Labels
not a problem False warnings from compilers or analysis tools

Comments

@gperciva
Copy link
Member

Compiling tarsnap on modern GNU/Linux systems leads to this warning (or error, depending on compiler flags):

In file included from ../lib-platform/util/memlimit.c:43:
/usr/include/x86_64-linux-gnu/sys/sysctl.h:21:2: error: #warning "The <sys/sysctl.h> header is deprecated and will be removed." [-Werror=cpp]
   21 | #warning "The <sys/sysctl.h> header is deprecated and will be removed."
      |  ^~~~~~~

That's not a problem, because that part of lib-platform/util/memlimit.c is:

#ifdef HAVE_SYS_SYSCTL_H
#include <sys/sysctl.h>
#endif

In other words, when <sys/sysctl.h> is removed, we won't try to include it.

I'm leaving this github issue open so that it's visible in case anybody else encounters this message and investigates.

@gperciva gperciva added wontfix not a problem False warnings from compilers or analysis tools and removed wontfix labels Jan 25, 2022
@cperciva cperciva changed the title build: The <sys/sysctrl.h> header is deprecated build: The <sys/sysctl.h> header is deprecated Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not a problem False warnings from compilers or analysis tools
Development

No branches or pull requests

1 participant