Opened 15 hours ago

Closed 14 hours ago

Last modified 12 hours ago

#19347 closed bug (fixed)

errno.h does not define ESOCKTNOSUPPORT

Reported by: bhaible Owned by: nobody
Priority: normal Milestone: R1/beta6
Component: System/POSIX Version: R1/beta5
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

POSIX:2024 specifies that <error.h> should define the constant ESOCKTNOSUPPORT. More details at Austin Group Defect 1067.

Haiku (hrev57823 is from 2024-07-15) does not define it.

How to reproduce:

  1. Save this file as foo.c
    #include <errno.h>
    int e = ESOCKTNOSUPPORT;
    int main () {}
    
  2. Compile it:
    gcc -Wall foo.c
    

Expected: no error.

Actual:

foo.c:2:9: error: 'ESOCKTNOSUPPORT' undeclared here (not in a function); did you mean 'EAFNOSUPPORT'?

Attachments (1)

foo.c (59 bytes ) - added by bhaible 15 hours ago.
test case foo.c

Download all attachments as: .zip

Change History (4)

by bhaible, 15 hours ago

Attachment: foo.c added

test case foo.c

comment:1 by waddlesplash, 14 hours ago

Milestone: UnscheduledR1/beta6
Resolution: fixed
Status: newclosed

Fixed in hrev58508.

comment:2 by alpopa, 13 hours ago

I believe the essence of the ticket is not just to add a new error code, but to actually signal / handle it in use-cases specified by socket interface.

This issue is inspired by the following post from forum: https://discuss.haiku-os.org/t/make-ansi-common-lisp-available-on-haiku-again/15780/135.

For specification see:

https://pubs.opengroup.org/onlinepubs/9799919799/functions/V2_chap02.html

https://pubs.opengroup.org/onlinepubs/9799919799/functions/socket.html

Last edited 13 hours ago by alpopa (previous) (diff)

comment:3 by waddlesplash, 12 hours ago

There are TODOs elsewhere about returning the proper EPROTOTYPE and other errors in the network stack which we don't do yet already.

Note: See TracTickets for help on using tickets.