You can use bit shifting, masking, and ORing to extract bytes and then recombine them in a different order.
rgbu = ((bgr & 255) << 24) | ((bgr & (255 << 8)) << 16) | ((bgr & (255 << 16)) << 8);
You might have to cast some of those as unsigned integers to ensure you don't encounter any negative funkiness. Also, I wasn't sure what the source and destination format were, so I just assumed you were converting from blue/green/red to red/green/blue/unused (most significant byte to least significant byte).