GLX_GLXEXT_PROTOTYPES

I am trying to use pbuffers in linux. If I just:
#define GLX_GLXEXT_PROTOTYPES
#include <GL/glxext.h>
I get errors for undefined glx functions.

If I modify glxext.h itself to have
#define GLX_GLXEXT_PROTOTYPES
everything is fine.

My question is: What is the correct process to enable the pbuffer functions in glx?

Thanks in advance for any help