If $d$ is a negative fundamental discriminant, then $$L(1,\chi_d)=\left(2-\left(\frac{d}{2}\right)\right)^{-1}\frac{\pi}{\sqrt{-d}}\sum_{t=1}^{\lfloor -d/2\rfloor}\left(\frac{d}{t}\right).$$$$L(1,\chi_d)=\frac{\pi}{(2-\chi_d(2))\sqrt{-d}}\sum_{t=1}^{\lfloor -d/2\rfloor}\chi_d(t).$$ Here $\chi_d$ denotes the quadratic Dirichlet character $\left(\frac{d}{\cdot}\right)$. For a proof, see the proof of Theorem 3.9 in Section 10.3 of Rose: A course in number theory (2nd ed.).
Example. For $d=-8$ the above formula gives that $$L(1,\chi_{-8})=\frac{1}{2}\cdot\frac{\pi}{\sqrt{8}}\cdot(1+0+1+0)=\frac{\pi}{2\sqrt{2}}.$$$$L(1,\chi_{-8})=\frac{\pi}{2\sqrt{8}}(1+0+1+0)=\frac{\pi}{2\sqrt{2}}.$$