In order to qualify as a Qualified Small Business, the corporation has to be a C-Corp on the security issuance date.
If the business was formed as a different legal structure (e.g. LLC, S Corporation, Partnership), the company can terminate its legal structure to re-incorporate as a C-Corp before the issuance/sale of the stock.
Converting a legal entity raises various complications.  For example, if an entity is converting from an S-Corp to a C-Corp, it is not as simple as transferring stock for stock in the new entity as stock-for-stock transfers do not qualify for QSBS. It may be possible for the owners of the S-Corp to transfer the assets of the S-Corp to a C-Corp in exchange for QSBS under a tax-free exchange pursuant to IRC Section 351(a).