Problem reading MAC address (Ubuntu 64bit)


#1

On my Ubuntu 64bit system (haven’t tested on a 32bit system) I need to change the MAC address reading in juce_linux_Network.cpp SystemStats::getMACAddresses to this:

for (int j = 0; j < 6; ++j) a = (a << 8) | (uint8) ifr.ifr_hwaddr.sa_data[j];

The uint8 cast is needed to get correct values at all, otherwise the last 3 bytes are 0xff. The order change is needed to make the JUCE demo output the MAC in the same order as ifconfig does.


#2

Cool - thanks for letting me know, I’ll change that right away!