Suppose I have an oriented 4-manifold $X$ with boundary $\partial X$ an rational homology 3-sphere. If the restriction map $${\rm Spin}^c(X) \rightarrow {\rm Spin}^c(\partial X) $$ is surjective then does it necessarily follow that the map $$ H^2(X;\mathbb{Z}) \rightarrow H^2(\partial X; \mathbb{Z})$$ is necessarily surjective?
When $H^2(\partial X; \mathbb{Z})$ has odd order this appears to be true (the map $c_1$ commutes with restriction and will give a bijection $H^2(\partial X; \mathbb{Z})\rightarrow {\rm Spin}^c(\partial X)$ in this case). However, I'm confused about the case $H^2(\partial X; \mathbb{Z})$ has even order.
Thanks in advance.
$\text{Spin}^c(X)$ is a torsor (affine space) over $H^2(X, \mathbb{Z})$, similarly for $\partial X$. The action of $\alpha \in H^2(X, \mathbb{Z})$ is by tensoring the complex spinor bundle $\Sigma \to X$ with the line bundle $L$ specified by $\alpha$. Hence, surjectivity follows in the present situation.
If $\dim X = 4$, then$$c_1(\Sigma \otimes L) - c_1(\Sigma) = 2c_1(L) \in H^2(X, \mathbb{Z})$$because $\Sigma$ has rank $2$. So the first Chern class of $\Sigma$ is not necessarily enough to specify $\Sigma$.