-
-
Save sptndc/ee67db7a37896bfb3fcd8b3a3666dd9c to your computer and use it in GitHub Desktop.
| diff --git a/lib/crau/crau.h b/lib/crau/crau.h | |
| index 53d33555b..0d4f9f13e 100644 | |
| --- a/lib/crau/crau.h | |
| +++ b/lib/crau/crau.h | |
| @@ -251,10 +251,9 @@ void crau_data(struct crau_context_stack_st *stack, ...) | |
| # else | |
| # ifndef CRAU_MAYBE_UNUSED | |
| -# if defined(__has_c_attribute) | |
| -# if __has_c_attribute (__maybe_unused__) | |
| -# define CRAU_MAYBE_UNUSED [[__maybe_unused__]] | |
| -# endif | |
| +# if defined(__has_c_attribute) && \ | |
| + __has_c_attribute (__maybe_unused__) | |
| +# define CRAU_MAYBE_UNUSED [[__maybe_unused__]] | |
| # elif defined(__GNUC__) | |
| # define CRAU_MAYBE_UNUSED __attribute__((__unused__)) | |
| # endif |
Appreciate your fix, I'm on MacOS 13.7.8. How would I use this to make
brew install gnutlswork? Greatful for any help.
Hi, @kalaws.
First of all, I need to know, did you get an error when installing GnuTLS caused during the compilation of audit.c?
Here's the error:
Last 15 lines from /Users/username/Library/Logs/Homebrew/gnutls/02.make.log:
void crau_data(struct crau_context_stack_st *stack CRAU_MAYBE_UNUSED, ...)
^
./crau/crau.h:296:6: error: conflicting types for 'crau_data'
void crau_data(struct crau_context_stack_st *stack CRAU_MAYBE_UNUSED, ...)
^
./crau/crau.h:138:6: note: previous declaration is here
void crau_data(struct crau_context_stack_st *stack, ...);
^
12 errors generated.
make[3]: *** [audit.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
libtool: compile: clang -DHAVE_CONFIG_H -I. -I.. -DGNUTLS_BUILDING_LIB=1 -DLOCALEDIR="/usr/local/Cellar/gnutls/3.8.12/share/locale" -DSYSTEM_PRIORITY_FILE="/usr/local/etc/gnutls/config" -I./../gl -I./../gl -I./includes -I./x509 -I./includes -I./includes -I./x509 -I/usr/local/Cellar/libtasn1/4.21.0/include -I/usr/local/Cellar/p11-kit/0.26.2/include/p11-kit-1 -Wtype-limits -Wall -Wbad-function-cast -Wdate-time -Wdisabled-optimization -Wdouble-promotion -Wextra -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wnull-dereference -Wold-style-definition -Wpacked -Wpointer-arith -Wshadow -Wstrict-prototypes -Wuninitialized -Wunknown-pragmas -Wvariadic-macros -Wwrite-strings -Wformat=2 -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -fdiagnostics-show-option -fno-builtin-strcmp -I/usr/local/Cellar/nettle/3.10.2/include -I/usr/local/Cellar/libtasn1/4.21.0/include -I/usr/local/Cellar/libidn2/2.3.8/include -I/usr/local/Cellar/p11-kit/0.26.2/include/p11-kit-1 -g -O2 -c tls13-sig.c -fno-common -DPIC -o .libs/tls13-sig.o
make[2]: *** [install-recursive] Error 1
make[1]: *** [install] Error 2
make: *** [install-recursive] Error 1
Alright, that's the same error I got @kalaws.
- You must edit Homebrew's gnutls formula by running the command
brew edit gnutls. - Add the code below before
def install:
patch do
url "https://gist.githubusercontent.com/sptndc/ee67db7a37896bfb3fcd8b3a3666dd9c/raw/caede2f8c6f286e9694499ad065f02b3df701770/3.8.12-crau.h.patch"
sha256 "e776e8f3022266b751d8ea1f6d87ed98f882802a17121f3837b10a03456f691b"
end- Run the command with
HOMEBREW_NO_INSTALL_FROM_API=1 brew install gnutlsif installing for the first time orHOMEBREW_NO_INSTALL_FROM_API=1 brew upgrade gnutlsif you want to update gnutls.
I hope this helps!
Thank you, worked like a charm!
Glad to hear that it fixed the installation of GnuTLS v3.8.12 for you too!
I don't suppose it was virt-viewer you were installing as well? Now I'm struggling with gstreamer complaining about SSL certificate ....
Hi @kalaws, no I didn't install it, you'd better ask in Homebrew's Discussions.
Appreciate your fix, I'm on MacOS 13.7.8. How would I use this to make
brew install gnutlswork? Greatful for any help.