Do you have checked the file /usr/local/gearman/include/libgearman-1.0/interface/task.h ? Maybe the file is confused.
Do you have checked the file local/gearman/ include/ libgearman- 1.0/interface/ task.h
/usr/
? Maybe the file is confused.