RedHat 6 – Porting code to RH6

We are moving our product’s OS from RedHat 5 to 6, as well as new version of ‘gcc’ (4.X) along with RH6.  To port the existing code to RH6 with new compiler, there might be a lot of things we need to care. This post gives a brief summary for the issue during our trial and hopefully would be updated timely. May it help:)

1. C++ header file include
#include <iostream.h> -> #include <iostream>
#include <typeinfo.h> -> #include <typeinfo>
#include <list.h> -> #include <list>
#include “poll.h” -> #include <poll.h>
#include “fcntl.h” -> #include <fcntl.h>
a. All the standard C++ header file need to omit “.h”;
b. Standard C header file could have both format:
        #include <stdio.h> OR
        #include <cstdio>
   NOT  #include “stdio.h”

2. SCTP library
libsctp.a -> -lsctp
RH 6 does not support static lib of SCTP. Should be dynamically linked.

3. SCTP struct/API
sctp_adaption_layer_event -> sctp_adaptation_layer_event
SCTP_ADAPTION_INDICATION -> SCTP_ADAPTATION_INDICATION
sctp_connectx(int, sockaddr*, int) -> sctp_connectx(int, sockaddr*, int, sctp_assoc_t*)
a. Member name updated in structure sctp_event_subscribe
b. Member name updated in enum sctp_sn_type
c. New argument updated in function sctp_connectx

4. Linux Kernel API
extern struct net_device *dev_get_by_name( const char *name) ->
extern struct net_devide *dev_get_by_name( struct net *net, const char *name)

About daveti

Interested in kernel hacking, compilers, machine learning and guitars.
This entry was posted in OS, Programming, Stuff about Compiler and tagged , , , . Bookmark the permalink.

1 Response to RedHat 6 – Porting code to RH6

  1. dsgs says:

    Excellent goods cheap Gucci handbags from you, man. I have take note your stuff previous to and you’re just extremely fantastic.shopsellbags I actually like what you’ve bought here, really like what you are saying and the way in which wherein you say it.cheap lv handbags You’re making it entertaining and you continue to take care of to keep it sensible. I can not wait to read much more from you. cheap BURBERRY handbagsThat is actually a terrific site.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.