Use a compiler that supports C(11), you are going to needed it for BIND 9.20.

You may get away with adding "#define _Atomic(x) x” to 
lib/isc/include/isc/stdatomic.h.
See the attached diff.  I’ve not tested this because I don’t have such an 
ancient compiler
installed nor do I believe I can install one for my hardware.

Mark

> On 6 Nov 2024, at 02:32, N M <bfl...@gmail.com> wrote:
> 
> What changed between bind-9.18.30 and bind-9.18.31 that would cause it to not 
> compile? We can compile bind-9.18.30 just fine but bind-9.18.31 fails with 
> netmgr/udp errors:
> 
> 
> netmgr/udp.c:813:8: warning: return type defaults to 'int' [enabled by 
> default]
> static _Atomic(isc_stdtime_t) last_udpsends_log = 0;
>       ^
> netmgr/udp.c: In function '_Atomic':
> netmgr/udp.c:813:31: error: expected declaration specifiers before 
> 'last_udpsends_log'
> static _Atomic(isc_stdtime_t) last_udpsends_log = 0;
>                              ^
> netmgr/udp.c:816:25: error: expected '=', ',', ';', 'asm' or '__attribute__' 
> before '{' token
> can_log_udp_sends(void) {
>                        ^
> netmgr/udp.c:834:25: error: expected '=', ',', ';', 'asm' or '__attribute__' 
> before '{' token
>  isc_sockaddr_t *peer) {
>                        ^
> netmgr/udp.c:894:64: error: expected '=', ',', ';', 'asm' or '__attribute__' 
> before '{' token
> udp_connect_direct(isc_nmsocket_t *sock, isc__nm_uvreq_t *req) {
>                                                               ^
> netmgr/udp.c:985:75: error: expected '=', ',', ';', 'asm' or '__attribute__' 
> before '{' token
> isc__nm_async_udpconnect(isc__networker_t *worker, isc__netievent_t *ev0) {
>                                                                          ^
> netmgr/udp.c:1021:29: error: expected '=', ',', ';', 'asm' or '__attribute__' 
> before '{' token
>    size_t extrahandlesize) {
>                            ^
> netmgr/udp.c:1097:52: error: expected '=', ',', ';', 'asm' or '__attribute__' 
> before '{' token
>      const struct sockaddr *addr, unsigned flags) {
>                                                   ^
> netmgr/udp.c:1116:71: error: expected '=', ',', ';', 'asm' or '__attribute__' 
> before '{' token
> isc__nm_udp_failed_read_cb(isc_nmsocket_t *sock, isc_result_t result) {
>                                                                      ^
> netmgr/udp.c:1164:72: error: expected '=', ',', ';', 'asm' or '__attribute__' 
> before '{' token
> isc__nm_async_udpread(isc__networker_t *worker, isc__netievent_t *ev0) {
>                                                                       ^
> netmgr/udp.c:1192:76: error: expected '=', ',', ';', 'asm' or '__attribute__' 
> before '{' token
> isc__nm_udp_read(isc_nmhandle_t *handle, isc_nm_recv_cb_t cb, void *cbarg) {
>                                                                           ^
> netmgr/udp.c:1218:34: error: expected '=', ',', ';', 'asm' or '__attribute__' 
> before '{' token
> udp_stop_cb(uv_handle_t *handle) {
>                                 ^
> netmgr/udp.c:1240:35: error: expected '=', ',', ';', 'asm' or '__attribute__' 
> before '{' token
> udp_close_cb(uv_handle_t *handle) {
>                                  ^
> netmgr/udp.c:1267:42: error: expected '=', ',', ';', 'asm' or '__attribute__' 
> before '{' token
> read_timer_close_cb(uv_handle_t *handle) {
>                                         ^
> netmgr/udp.c:1279:38: error: expected '=', ',', ';', 'asm' or '__attribute__' 
> before '{' token
> stop_udp_child(isc_nmsocket_t *sock) {
>                                     ^
> netmgr/udp.c:1297:39: error: expected '=', ',', ';', 'asm' or '__attribute__' 
> before '{' token
> stop_udp_parent(isc_nmsocket_t *sock) {
>                                      ^
> netmgr/udp.c:1330:40: error: expected '=', ',', ';', 'asm' or '__attribute__' 
> before '{' token
> udp_close_direct(isc_nmsocket_t *sock) {
>                                       ^
> netmgr/udp.c:1339:73: error: expected '=', ',', ';', 'asm' or '__attribute__' 
> before '{' token
> isc__nm_async_udpclose(isc__networker_t *worker, isc__netievent_t *ev0) {
>                                                                        ^
> netmgr/udp.c:1351:41: error: expected '=', ',', ';', 'asm' or '__attribute__' 
> before '{' token
> isc__nm_udp_close(isc_nmsocket_t *sock) {
>                                        ^
> netmgr/udp.c:1373:44: error: expected '=', ',', ';', 'asm' or '__attribute__' 
> before '{' token
> isc__nm_udp_shutdown(isc_nmsocket_t *sock) {
>                                           ^
> netmgr/udp.c:1417:48: error: expected '=', ',', ';', 'asm' or '__attribute__' 
> before '{' token
> isc__nm_udp_cancelread(isc_nmhandle_t *handle) {
>                                               ^
> netmgr/udp.c:1435:74: error: expected '=', ',', ';', 'asm' or '__attribute__' 
> before '{' token
> isc__nm_async_udpcancel(isc__networker_t *worker, isc__netievent_t *ev0) {
>                                                                         ^
> netmgr/udp.c:813:1: error: parameter name omitted
> static _Atomic(isc_stdtime_t) last_udpsends_log = 0;
> ^
> netmgr/udp.c:1449:1: error: expected '{' at end of input
> }
> ^
> netmgr/udp.c: At top level:
> netmgr/udp.c:65:1: warning: 'udp_send_direct' used but never defined [enabled 
> by default]
> udp_send_direct(isc_nmsocket_t *sock, isc__nm_uvreq_t *req,
> ^
> netmgr/udp.c:85:1: warning: 'stop_udp_parent' used but never defined [enabled 
> by default]
> stop_udp_parent(isc_nmsocket_t *sock);
> ^
> netmgr/udp.c:87:1: warning: 'stop_udp_child' used but never defined [enabled 
> by default]
> stop_udp_child(isc_nmsocket_t *sock);
> ^
> netmgr/udp.c:793:1: warning: 'udp_send_cb' defined but not used 
> [-Wunused-function]
> udp_send_cb(uv_udp_send_t *req, int status) {
> ^
> netmgr/udp.c:76:1: warning: 'udp_close_cb' declared 'static' but never 
> defined [-Wunused-function]
> udp_close_cb(uv_handle_t *handle);
> ^
> netmgr/udp.c:79:1: warning: 'read_timer_close_cb' declared 'static' but never 
> defined [-Wunused-function]
> read_timer_close_cb(uv_handle_t *handle);
> ^
> netmgr/udp.c:82:1: warning: 'udp_close_direct' declared 'static' but never 
> defined [-Wunused-function]
> udp_close_direct(isc_nmsocket_t *sock);
> ^
> netmgr/udp.c:813:8: warning: '_Atomic' defined but not used 
> [-Wunused-function]
> static _Atomic(isc_stdtime_t) last_udpsends_log = 0;
> 
> _________________________________________________________
> Nathan
> -- 
> Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from 
> this list
> 
> ISC funds the development of this software with paid support subscriptions. 
> Contact us at https://www.isc.org/contact/ for more information.
> 
> 
> bind-users mailing list
> bind-users@lists.isc.org
> https://lists.isc.org/mailman/listinfo/bind-users

-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742              INTERNET: ma...@isc.org

Attachment: diff
Description: Binary data

-- 
Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from 
this list

ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users

Reply via email to