While trying to produce a version of my app that uses libmosquitto in windows 10 / Visual studio 2015 I came to this issue regarding "config.h". I had to coment that line:
// #define snprintf sprintf_s
I'm not an expert on the windows side but after googleing a bit I found there are some kind of issue with that define as snprintf implementation is afected by VS version.
Fix building on Visual Studio 2015
Thanks to Pelayo Méndez.