public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cygwin and C socket
@ 2009-06-26 14:55 lrc
  2009-06-26 15:14 ` Corinna Vinschen
  0 siblings, 1 reply; 2+ messages in thread
From: lrc @ 2009-06-26 14:55 UTC (permalink / raw)
  To: cygwin


Hello, I am trying to build a PoC around calling a RESTFul service from a C
program. I have installed the eclipse CDT and Cygwin and can build and run a
hello world C exe.

The next test is to use the socket stuff to connect to a URL, however whe I
try to compile my code (taken from another site) I get an error that the
compiler does not know the size of an object. I can not finr the addrinfo
struct in any of the include below. Is there a specific package I need to
install to make this work?

Thanks



the code in question:

#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <arpa/inet.h>


int main(int argc, char *argv[]) {


	struct addrinfo hints, *res, *p;
......
	
	if ((status = getaddrinfo(argv[1], NULL, &hints, &res)) != 0) {
-- 
View this message in context: http://www.nabble.com/Cygwin-and-C-socket-tp24221636p24221636.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Cygwin and C socket
  2009-06-26 14:55 Cygwin and C socket lrc
@ 2009-06-26 15:14 ` Corinna Vinschen
  0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2009-06-26 15:14 UTC (permalink / raw)
  To: cygwin

On Jun 26 07:47, lrc wrote:
> 	if ((status = getaddrinfo(argv[1], NULL, &hints, &res)) != 0) {

getaddrinfo isn't available in Cygwin 1.5.25, but will be available
in Cygwin 1.7.  See http://cygwin.com/#beta-test


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-26 14:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-26 14:55 Cygwin and C socket lrc
2009-06-26 15:14 ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).