Shape of feces in herbivores
I don't think it is an adaption, but the that diet plays a dominant role. The feces of cows in intensively fertilized agricultural fields, with grasses rich in protein, has no shape at all. See picture below.
 

The feces of cows in natural areas has much more structure. (image has copyright, so can only link)