<sys/socket.h> POSIX Compliance Issue

Joel Sherrill joel.sherrill at oarcorp.com
Fri Jan 23 00:37:40 UTC 2015


Hi

In running the Open Group FACE Conformance Test Suite on RTEMS, it
spotted that the old network stack's <sys/socket.h> does not include
the types.h (or sys/types.h) to get ssize_t. That means you get a type
undefined error if you followk

http://pubs.opengroup.org/onlinepubs/7908799/xns/syssocket.h.html

This impacts all the methods in <sys/socket.h> since the test suite assumes
that it only needs to include the .h file(s) specified by Open Group.

+ Does this occur with the new stack?
+ Is it OK to add the appropiate include file to old stack's socket.h?

Here is a test case.

=====================
#include <sys/socket.h>

void f(void)
{
  ssize_t s;
  int socket = 0;
  void *buffer = 0;
  size_t length = 0;
  int flags = 0;
  struct sockaddr *address = 0;
  socklen_t *address_len = 0;
 
  s = recvfrom(socket, buffer, length, flags, address, address_len);
}
=====================

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985




More information about the devel mailing list