Unknown type 'fd_set'

What do I need to install to prevent the above error when compiling something?

Various searches point to using a different version of glibc. How do I tell which version I have and how to update it?

Looks like blocking I/O, select(), perhaps?

Likely your header includes are wrong. "compiling something" isn't enough to go on. Likely it was not properly configured, especially if the code is using GNU-style configuration.

I tried following the guide here:-


wget ftp://ftp.denx.de/pub/u-boot/u-boot-2013.10.tar.bz2
tar jxf u-boot-2013.10.tar.bz2
cd u-boot-2013.10/tools/
gcc -o kwboot kwboot.c

Of these four lines, only one worked without a problem :slight_smile:

The first failed with:-
Downloading 'ftp://ftp.denx.de/pub/u-boot/u-boot-2013.10.tar.bz2'
Failed to allocate uclient context

I had to install bsdtar to handle the '-j' flag. OpenWrt's tar wouldn't handle it. Also not sure if bzip2 is included in the base install.

And then gcc gave me the error in the thread title.

Because, I am guessing you tried to run them on your OpenWrt device.

The current page (since you linked the archived page which has a clear warning that it is unmaintained) is https://openwrt.org/toh/seagate/goflexnet#recovery_of_a_bricked_uboot_without_jtag

Past trying to build anything on an OpenWrt box, not to mention one that is, by context, bricked, the final hint is the line you omitted:

./kwboot -b /tmp/openwrt-kirkwood-goflexhome-u-boot.kwb -t -p -B 115200 /dev/ttyUSB0

which, to me, suggests that you're going to download an image to the boot loader over serial. I would find the referenced articles and read them carefully.

I'd also be aware of the warnings on the OpenWrt device page


which may have been resolved, but are still on the page.

I understand the warning but given that the original guide was from 2013 and uses a tarball from that time I'm surprised I can't get it to build.

I assume the guide was for building on OpenWrt, which I am trying. Maybe I'm mistaken. Presumably the error which I'm seeing regarding 'fd_set' did not happen at the time.

Can anyone tell me what is causing it? Is it because some headers are missing from my toolchain?

It seems completely inconsistent that it be on the OpenWrt box as the instructions you reference are for


If your router is bricked, how could you execute any of those instructions on it?

Good point :slight_smile:

1 Like