Hm. Since the black bits I had thought were patches of paint adhering to the rust seem in fact to be holes, I might be tempted to consider replacing the post, if not now, sometime in the next few years.
OTOH, it seems that something, perhaps a timber wall plate, was attached to the brickwork shown, and the (or a) gate may have been attached to that. Are the old ways the best, or possible? It might tidy the job up. Hard to tell without a more scenic pic to look at the whole thing in context.