Diesel antifreeze and regular antifreeze for gasoline engines is pretty similar however the main difference between diesel antifreeze and regular antifreeze is that unlike regular antifreeze the diesel antifreeze contains a special additive that is added to the diesel antifreeze that protects against erosion on cylinder walls.
Regular antifreeze doesn't have that special antifreeze and could harm the diesel engine and cause corrosion on the diesel engines cylinder walls.
However if you have no choice but to use some regular antifreeze or coolant in the diesel engine then you can safely do so for a short period of time.
But when you can get diesel antifreeze for the diesel engine then you should replace the antifreeze with the proper antifreeze to avoid damage to your diesel engine which can be expensive.