When we originally got our hives we placed them near the chickens and ducks, and for most of the year it was fine. One hive got defensive towards the end of the year and if they got angry during an inspection they would go for anything that moved, especially our black drake.
As others have said it depends on their temperament, and exactly how close they are.