I was able to compile your code after installing freeglut library. But I am not sure how to check for the bug after this. Also I can't see the code to create the GL context. Please refer to APP SDK Sample SimpleGL, and then give more details about how to reproduce the issue.
The program is meant to display a 512*512 blue square that fades to magenta over ~1 second. This works fine on the GPU, but on the CPU the square stays blue. Inserting print statements shows that the OpenCL kernel is being run with the appropriate values, but the texture is not updating. The OpenGL context is created automatically in glutInit().
Sorry for the late reply.
using glut for CL-GL interop is not recommended as there does not seem to be a way to get hold of the GL context from glut API. Can you try to use raw windowing capabilities, and create a testcase. You can refer to SimpleGL sample for testcase creation.