7.0-3/7.0-4 pgcc error

#include <stdio.h>
#include <byteswap.h>

int main()
{
long int fred,joe;
fred=66;
joe=bswap_64(fred);
printf(“fred=0%lx joe=0%lx\n”,fred,joe);
}
fails with:
foo.c:(.text+0x17): undefined reference to `__bswap_64’

Works with 6.2-5

Seems, looking at pgcc -E output, the problem is you read in
/usr/include/bits/byteswap.h
instead of your own version
linux86-64/7.0-4/include/bits/byteswap.h

This unfortunately causes compiling Qlogic/QuickSIlver MVAPICH to fail in
this way.

Work around?

Regards,
Mostyn

Update:
Should have seen this but the linux86-64/7.0-4/include/bits directory for
x86_64 only contains types.h and no byteswap.h but the linux86/7.0-4/include/bits
directory contains both.
Is this an installation error, PGI booboo?
I’m tempted to just copy from one to the other.

Regards,
Mostyn

I just looked at 7.0.6 and it has the same problem.