This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ada/37945] New: GNAT Sockaddr and Sockaddr_In does not match c-structures on RTEMS


RTEMS has FreeBSD style structures:

Sockaddr and Sockaddr_In should have the 8bit Len and Family variable instead
of
16 family in gcc/ada/socthi.ads.

Bug prevents at least binding local address to socket, connecting tcp socket or
sending udp data.

diff g-socthi.ads g-socthi-rtems.ads
145c145,146
<       Sa_Family : C.unsigned_short;
---
>       Sa_Len    : C.unsigned_char;
>       Sa_Family : C.unsigned_char;
156c157,158
<       Sin_Family : C.unsigned_short      := Constants.AF_INET;
---
>       Sin_Len    : C.unsigned_char       := 0;
>       Sin_Family : C.unsigned_char       := Constants.AF_INET;


diff g-socthi.adb g-socthi-rtems.adb
451c451
<       Sin.Sin_Family := C.unsigned_short (Family);
---
>       Sin.Sin_Family := C.unsigned_char (Family);


-- 
           Summary: GNAT Sockaddr and Sockaddr_In does not match c-
                    structures on RTEMS
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: petri dot rokka at tut dot fi


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37945


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]