DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 3rd June 2009
SunSpyda SunSpyda is offline
Port Guard
 
Join Date: Mar 2009
Posts: 20
Question netinet/in.h in OpenBSD 4.4 i386 broken?

I'm trying to get socket programming to work, but it just won't do it. I've tried the same code on Linux and other *nix OSes, and it worked fine, but it just refuses to work on OpenBSD...

The faults occur within that header file. Let's take this *really* simple C code...

Code:
#include <netinet/in.h>
#include <stdio.h>
#include <sys/socket.h>

#define PORT 13

int main( void )
{
    int socket = socket( AF_INET, SOCK_STREAM, 0 );
    struct sockaddr_in address;

    address.sin_family = AF_INET;
    address.sin_port = PORT;

    puts( "\nInitialization complete.\n" );

    return 0;
}
As I said, this code works great on other *nix OSes, but not OpenBSD. It just chokes when processing the netinet/in.h file. Any ideas?

I'm using GCC by the way.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenBSD 4.6 i386 boot hangs with old gateway system - resolved comet--berkeley OpenBSD Installation and Upgrading 6 22nd July 2011 08:15 AM
openbsd 4.5 macppc radeon drive still broken gosha OpenBSD Installation and Upgrading 13 28th June 2009 03:14 PM
openbsd 4.3 e2fsprogs seems to be broken gosha OpenBSD Packages and Ports 0 27th June 2009 03:18 AM
WindowMaker 0.92.0p7 (OpenBSD 4.4/i386 Packages) configuration issue. xixobrax OpenBSD General 1 3rd May 2009 04:04 PM
OpenBSD 4.4/4.5 i386 installation on Dell Inspiron 6400 notebook. xixobrax OpenBSD Installation and Upgrading 12 30th April 2009 04:34 AM


All times are GMT. The time now is 03:35 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick