I hadn't come across the second meaning before:

2 a square wooden or metal bar for supporting a topmast.

Seems confusing to have the same short word for two very different objects, both found on board!