update swap.h from kk_2.7 to fix compilation