Skip to content

Build error in sr source code on ubuntu 10.04 #2

@cwoodruf

Description

@cwoodruf

When building the sr router from
http://nsl.cs.sfu.ca/teaching/11/771/projects/router/sr_stub.tar.gz

c@d:~/471/a2/stub$ make sr
gcc -c -g -Wall -ansi -D_DEBUG_ -D_LINUX_ sr_router.c -o sr_router.o
gcc -c -g -Wall -ansi -D_DEBUG_ -D_LINUX_ sr_main.c -o sr_main.o
gcc -c -g -Wall -ansi -D_DEBUG_ -D_LINUX_ sr_if.c -o sr_if.o
gcc -c -g -Wall -ansi -D_DEBUG_ -D_LINUX_ sr_rt.c -o sr_rt.o
gcc -c -g -Wall -ansi -D_DEBUG_ -D_LINUX_ sr_vns_comm.c -o sr_vns_comm.o
sr_vns_comm.c: In function ‘sr_connect_to_server’:
sr_vns_comm.c:109: error: ‘struct hostent’ has no member named ‘h_addr’
make: *** [sr_vns_comm.o] Error 1

This can be fixed as described in the gethostent man page by adding

define h_addr h_addr_list[0]

to the sr_vns_comm.c file

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions